diff --git a/src/react/components/pages/editorPage/canvas.tsx b/src/react/components/pages/editorPage/canvas.tsx index 8d4a3e8d1..045bfd697 100644 --- a/src/react/components/pages/editorPage/canvas.tsx +++ b/src/react/components/pages/editorPage/canvas.tsx @@ -1993,11 +1993,17 @@ export default class Canvas extends React.Component } const prevTypes = {}; - prevTags.forEach((tag) => prevTypes[tag.name] = tag.type); - + const prevColors = {}; + prevTags.forEach((tag) => { + prevTypes[tag.name] = tag.type; + prevColors[tag.name] = tag.color; + }); const types = {}; - tags.forEach((tag) => types[tag.name] = tag.type); - + const colors = {}; + tags.forEach((tag) => { + types[tag.name] = tag.type; + colors[tag.name] = tag.color; + }); for (const name of names) { const prevType = prevTypes[name]; const type = types[name]; @@ -2006,6 +2012,12 @@ export default class Canvas extends React.Component // some tag change between checkbox and text return true; } + const prevColor = prevColors[name]; + const color = colors[name]; + if (prevColor !== color) { + // some tag color changed + return true; + } } return false;