diff --git a/vendor-overwrites/colorpicker/colorview.js b/vendor-overwrites/colorpicker/colorview.js index ed149897..1a5c1879 100644 --- a/vendor-overwrites/colorpicker/colorview.js +++ b/vendor-overwrites/colorpicker/colorview.js @@ -64,9 +64,11 @@ } function unregisterHooks() { - const mx = CodeMirror.modeExtensions.css; - if (mx && mx.token === colorizeToken) { - delete mx.token; + for (const name in CodeMirror.modeExtensions) { + const mx = CodeMirror.modeExtensions[name]; + if (mx && mx.token === colorizeToken) { + delete mx.token; + } } }