Skip to content

Commit

Permalink
BUGFIX: Prevent error when configured default mode is not overwritten
Browse files Browse the repository at this point in the history
  • Loading branch information
Sebobo committed Apr 8, 2024
1 parent 1a96b80 commit 8c7abc4
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
Expand Up @@ -69,10 +69,10 @@ export default function makeColorPickerEditor(defaults: ColorPickerOptions) {
}

handleChangeColor = (newColor) => {
const { commit, options } = this.props;
const { presetColors } = this.state;
const { commit } = this.props;
const { mode, presetColors } = this.state;

switch (options.mode) {
switch (mode) {
// In the mode "preset", the value to be stored might can be defined in the color definition value
case 'preset': {
const matchingPreset = presetColors.find((preset) => preset.color === newColor.hex);
Expand Down
2 changes: 1 addition & 1 deletion Resources/Public/ColorPickerEditor/Plugin.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion Resources/Public/ColorPickerEditor/Plugin.js.map

Large diffs are not rendered by default.

0 comments on commit 8c7abc4

Please sign in to comment.