From 109c393cc6ee0cb1fc7fe097645cd4ddf1bf980a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=8A=B1=E8=A3=A4=E8=A1=A9?= Date: Mon, 14 Jan 2019 14:07:56 +0800 Subject: [PATCH] fix[ThemePicker]: fixed bug when oldVal is null (#1517) --- src/components/ThemePicker/index.vue | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/components/ThemePicker/index.vue b/src/components/ThemePicker/index.vue index e797d6c2..5d1ff8bd 100644 --- a/src/components/ThemePicker/index.vue +++ b/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('#', ''))