File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -32,19 +32,19 @@ export function useCssVar(
32
32
const variable = shallowRef ( initialValue )
33
33
34
34
// Track if target has ever had a truthy value
35
- const targetHadValue = shallowRef ( false )
35
+ let targetHadValue = false
36
36
37
37
const elRef = computed ( ( ) => {
38
38
const element = unrefElement ( target )
39
39
40
40
if ( element ) {
41
- targetHadValue . value = true
41
+ targetHadValue = true
42
42
return element
43
43
}
44
44
45
45
// If target never had a value, use documentElement as fallback
46
46
// If target had a value but now is undefined, don't use fallback
47
- return targetHadValue . value ? null : window ?. document ?. documentElement
47
+ return targetHadValue ? null : window ?. document ?. documentElement
48
48
} )
49
49
50
50
function updateCssVar ( ) {
You can’t perform that action at this time.
0 commit comments