Skip to content

Commit ee1f855

Browse files
committed
chore(theme): use Reflect for proxy operations
1 parent c47c329 commit ee1f855

File tree

1 file changed

+3
-5
lines changed
  • packages/vuetify/src/composables

1 file changed

+3
-5
lines changed

packages/vuetify/src/composables/theme.ts

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -506,17 +506,15 @@ export function createTheme (options?: ThemeOptions): ThemeInstance & { install:
506506

507507
const globalName = new Proxy(name, {
508508
get (target, prop) {
509-
return target[prop as keyof typeof target]
509+
return Reflect.get(target, prop)
510510
},
511511
set (target, prop, val) {
512512
if (prop === 'value') {
513513
deprecate(`theme.global.name.value = ${val}`, `theme.change('${val}')`)
514514
}
515-
// @ts-expect-error
516-
target[prop] = val
517-
return true
515+
return Reflect.set(target, prop, val)
518516
},
519-
}) as typeof name
517+
})
520518

521519
return {
522520
install,

0 commit comments

Comments
 (0)