瀏覽代碼

fix: remove Object.seal to options

Object.seal changes the original object and prevents the options to be
observable.
Gerald 4 年之前
父節點
當前提交
9402cbaf27
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      src/common/ui/setting-text.vue

+ 1 - 1
src/common/ui/setting-text.vue

@@ -77,7 +77,7 @@ export default {
       // XXX compatible with old data format
       // XXX compatible with old data format
       : (value => (Array.isArray(value) ? value.join('\n') : value || ''));
       : (value => (Array.isArray(value) ? value.join('\n') : value || ''));
     this.revoke = hookSetting(this.name, val => {
     this.revoke = hookSetting(this.name, val => {
-      this.savedValue = Object.seal(val);
+      this.savedValue = val;
       this.value = handle(val);
       this.value = handle(val);
     });
     });
     this.defaultValue = objectGet(defaults, this.name);
     this.defaultValue = objectGet(defaults, this.name);