Skip to content

Commit 109c393

Browse files
authored
fix[ThemePicker]: fixed bug when oldVal is null (PanJiaChen#1517)
1 parent c54e99d commit 109c393

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/components/ThemePicker/index.vue

Lines changed: 2 additions & 1 deletion
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)