Spaces:
Runtime error
Runtime error
[BUG] Custom color map doesn't stick
#1
by
gsarti
- opened
Creating this to keep track of the problem:
Issue
If a custom color map is specified in the component declaration but is not used right away, it gets overridden and the default color map is used. This is because current_color_map
in HighlightedTextbox.svelte
is set once and only current_color_map
is checked on set_color_map
.
Proposed fix
Move the initialization current_color_map = !color_map || Object.keys(color_map).length === 0 ? {} : color_map;
as the first line of set_color_map
to run it at every change.
Fixed in v0.11
gsarti
changed discussion status to
closed