Skip to content

Commit

Permalink
fix[ThemePicker]: fixed bug when oldVal is null (PanJiaChen#1517)
Browse files Browse the repository at this point in the history
  • Loading branch information
PanJiaChen authored Jan 14, 2019
1 parent c54e99d commit 109c393
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/components/ThemePicker/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ export default {
}
},
watch: {
theme(val, oldVal) {
theme(val) {
const oldVal = this.theme
if (typeof val !== 'string') return
const themeCluster = this.getThemeCluster(val.replace('#', ''))
const originalCluster = this.getThemeCluster(oldVal.replace('#', ''))
Expand Down

0 comments on commit 109c393

Please sign in to comment.