From 482c86a25a68a20ca950d0dc5fa8a1e00bde6783 Mon Sep 17 00:00:00 2001 From: syuilo Date: Sat, 24 Feb 2018 06:29:21 +0900 Subject: :v: --- src/web/app/common/define-widget.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/web/app/common/define-widget.ts') diff --git a/src/web/app/common/define-widget.ts b/src/web/app/common/define-widget.ts index 826f9cc636..21821629ad 100644 --- a/src/web/app/common/define-widget.ts +++ b/src/web/app/common/define-widget.ts @@ -34,19 +34,20 @@ export default function(data: { } this.$watch('props', newProps => { + const w = (this as any).os.i.client_settings.mobile_home.find(w => w.id == this.id); if (this.isMobile) { (this as any).api('i/update_mobile_home', { id: this.id, data: newProps }).then(() => { - (this as any).os.i.client_settings.mobile_home.find(w => w.id == this.id).data = newProps; + w.data = newProps; }); } else { (this as any).api('i/update_home', { id: this.id, data: newProps }).then(() => { - (this as any).os.i.client_settings.home.find(w => w.id == this.id).data = newProps; + w.data = newProps; }); } }, { -- cgit v1.2.3-freya