タイトル通り
ウィジェットを削除できる
ウィジェットを削除できない
Misskey: 11.26.1
Browser: Chrome 75
OS: macOS 10.14.5
謎
×ボタンを押すと, コンソールにエラーでてる
mobile.11.26.0.js:7 TypeError: Cannot use 'in' operator to search for 'Default' in state.settings.mobileHomeProfiles
at Function.zt [as set] (mobile.11.26.0.js:7)
at c.removeMobileHomeWidget (mobile.11.26.0.js:37)
at mobile.11.26.0.js:9
at mobile.11.26.0.js:15
at Array.forEach (<anonymous>)
at mobile.11.26.0.js:15
at c._withCommit (mobile.11.26.0.js:15)
at c.commit (mobile.11.26.0.js:15)
at commit (mobile.11.26.0.js:9)
at o.removeWidget (63.11.26.0.js:1)
原因はこれじゃないですかね
vue/src/core/observer/index.jsより
if (key in target && !(key in Object.prototype)) {
target[key] = val
return val
}
あと以下のコードで動くと思います
```js
// src/client/app/store.ts
removeMobileHomeWidget(state, widget) {
state.settings.mobileHomeProfiles[state.device.mobileHomeProfile] = state.settings.mobileHomeProfiles[state.device.mobileHomeProfile].filter(w => w.id != widget.id);
os.store.dispatch('settings/updateMobileHomeProfile');
},
v12 で直っているのでとじます
Most helpful comment
謎