Skip to content

Commit 729b485

Browse files
committed
Only attempt to beautify if we have a cM instance
1 parent 4f97378 commit 729b485

1 file changed

Lines changed: 7 additions & 5 deletions

File tree

plugins/cssbeautify/index.php

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,11 @@
3535
0<g&&(c=2)):a+=b;else if(6===c)if(!q(b))a+=b,c=7;else{if("'"===d||'"'===d)c=7}else 7===c?"}"===b?(n(),c=0,0<g&&(c=2)):";"===b?(a=f(a),a+=";\n",c=4):(a+=b,"("===b&&"l"===a.charAt(a.length-2)&&"r"===a.charAt(a.length-3)&&"u"===a.charAt(a.length-4)&&(c=8)):8===c&&")"===b&&a.charAt("\\"!==a.length-1)?(a+=b,c=7):a+=b}return a=k.join("")+a}"undefined"!==typeof exports?module.exports=exports=p:"object"===typeof window&&(window.cssbeautify=p)})();
3636
3737
cM = top.ICEcoder.getcMInstance();
38-
cM.setValue(cssbeautify(cM.getValue(), {
39-
indent: ' ',
40-
openbrace: 'end-of-line',
41-
autosemicolon: false
42-
}));
38+
if (cM) {
39+
cM.setValue(cssbeautify(cM.getValue(), {
40+
indent: ' ',
41+
openbrace: 'end-of-line',
42+
autosemicolon: false
43+
}));
44+
}
4345
</script>

0 commit comments

Comments
 (0)