File tree Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -51,12 +51,12 @@ export function registerColorDecorator(
5151 workspace . getConfiguration ( 'tailwindCSS' , editor . document )
5252 . colorDecorators || 'inherit'
5353
54- let enabled =
54+ let enabled : boolean =
5555 preference === 'inherit'
56- ? workspace . getConfiguration ( 'editor' ) . colorDecorators
56+ ? Boolean ( workspace . getConfiguration ( 'editor' ) . colorDecorators )
5757 : preference === 'on'
5858
59- if ( enabled !== true ) {
59+ if ( ! enabled ) {
6060 editor . setDecorations ( colorDecorationType , [ ] )
6161 return
6262 }
@@ -120,7 +120,10 @@ export function registerColorDecorator(
120120 )
121121
122122 workspace . onDidChangeConfiguration ( ( e ) => {
123- if ( e . affectsConfiguration ( 'tailwindCSS.colorDecorators' ) ) {
123+ if (
124+ e . affectsConfiguration ( 'editor.colorDecorators' ) ||
125+ e . affectsConfiguration ( 'tailwindCSS.colorDecorators' )
126+ ) {
124127 window . visibleTextEditors . forEach ( updateDecorationsInEditor )
125128 }
126129 } )
You can’t perform that action at this time.
0 commit comments