Skip to content

Commit bae3601

Browse files
committed
fix[ThemePicker]: fixed bug when oldVal is null (#1517)
1 parent 77113a0 commit bae3601

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/components/ThemePicker/index.vue

+2-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,8 @@ export default {
1818
}
1919
},
2020
watch: {
21-
theme(val, oldVal) {
21+
theme(val) {
22+
const oldVal = this.theme
2223
if (typeof val !== 'string') return
2324
const themeCluster = this.getThemeCluster(val.replace('#', ''))
2425
const originalCluster = this.getThemeCluster(oldVal.replace('#', ''))

0 commit comments

Comments
 (0)