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(
51
51
workspace . getConfiguration ( 'tailwindCSS' , editor . document )
52
52
. colorDecorators || 'inherit'
53
53
54
- let enabled =
54
+ let enabled : boolean =
55
55
preference === 'inherit'
56
- ? workspace . getConfiguration ( 'editor' ) . colorDecorators
56
+ ? Boolean ( workspace . getConfiguration ( 'editor' ) . colorDecorators )
57
57
: preference === 'on'
58
58
59
- if ( enabled !== true ) {
59
+ if ( ! enabled ) {
60
60
editor . setDecorations ( colorDecorationType , [ ] )
61
61
return
62
62
}
@@ -120,7 +120,10 @@ export function registerColorDecorator(
120
120
)
121
121
122
122
workspace . onDidChangeConfiguration ( ( e ) => {
123
- if ( e . affectsConfiguration ( 'tailwindCSS.colorDecorators' ) ) {
123
+ if (
124
+ e . affectsConfiguration ( 'editor.colorDecorators' ) ||
125
+ e . affectsConfiguration ( 'tailwindCSS.colorDecorators' )
126
+ ) {
124
127
window . visibleTextEditors . forEach ( updateDecorationsInEditor )
125
128
}
126
129
} )
You can’t perform that action at this time.
0 commit comments