Browse Source

fix[ThemePicker]: fixed bug when oldVal is null (#1517)

pull/1521/head
花裤衩 6 years ago committed by GitHub
parent
commit
109c393cc6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 3
      src/components/ThemePicker/index.vue

3
src/components/ThemePicker/index.vue

@ -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('#', ''))

Loading…
Cancel
Save