Skip to content

Commit 8c7abc4

Browse files
committed
BUGFIX: Prevent error when configured default mode is not overwritten
1 parent 1a96b80 commit 8c7abc4

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

Resources/Private/Scripts/ColorPickerEditor/src/ColorPickerEditor.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -69,10 +69,10 @@ export default function makeColorPickerEditor(defaults: ColorPickerOptions) {
6969
}
7070

7171
handleChangeColor = (newColor) => {
72-
const { commit, options } = this.props;
73-
const { presetColors } = this.state;
72+
const { commit } = this.props;
73+
const { mode, presetColors } = this.state;
7474

75-
switch (options.mode) {
75+
switch (mode) {
7676
// In the mode "preset", the value to be stored might can be defined in the color definition value
7777
case 'preset': {
7878
const matchingPreset = presetColors.find((preset) => preset.color === newColor.hex);

Resources/Public/ColorPickerEditor/Plugin.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Resources/Public/ColorPickerEditor/Plugin.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)