Skip to content

Commit

Permalink
fix(useCssVar): remove spaces at both ends
Browse files Browse the repository at this point in the history
fix #1738
  • Loading branch information
murongg committed Jul 4, 2022
1 parent ef6cf56 commit c3ff635
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/core/useCssVar/index.ts
Expand Up @@ -30,7 +30,7 @@ export function useCssVar(
[elRef, () => unref(prop)],
([el, prop]) => {
if (el && window) {
const value = window.getComputedStyle(el).getPropertyValue(prop)
const value = window.getComputedStyle(el).getPropertyValue(prop).trimStart().trimEnd()
variable.value = value || initialValue
}
},
Expand Down

0 comments on commit c3ff635

Please sign in to comment.