summaryrefslogtreecommitdiff
path: root/src/client
diff options
context:
space:
mode:
authorsyuilo <Syuilotan@yahoo.co.jp>2021-02-26 18:06:48 +0900
committerGitHub <noreply@github.com>2021-02-26 18:06:48 +0900
commit377b0399a0dd7c8c557e547a17f18d97fb5e913b (patch)
tree01efce635338871438b77b2fa362f09017a4cada /src/client
parentMerge pull request #7262 from syuilo/dependabot/npm_and_yarn/webpack-5.24.2 (diff)
downloadmisskey-377b0399a0dd7c8c557e547a17f18d97fb5e913b.tar.gz
misskey-377b0399a0dd7c8c557e547a17f18d97fb5e913b.tar.bz2
misskey-377b0399a0dd7c8c557e547a17f18d97fb5e913b.zip
fix migration script
Diffstat (limited to 'src/client')
-rw-r--r--src/client/init.ts20
1 files changed, 11 insertions, 9 deletions
diff --git a/src/client/init.ts b/src/client/init.ts
index ce12849770..6a539a0e1d 100644
--- a/src/client/init.ts
+++ b/src/client/init.ts
@@ -15,16 +15,18 @@ if (localStorage.getItem('vuex') != null) {
localStorage.setItem('accounts', JSON.stringify(vuex.device.accounts));
localStorage.setItem('miux:themes', JSON.stringify(vuex.device.themes));
- for (const [k, v] of Object.entries(vuex.device.userData)) {
- localStorage.setItem('pizzax::base::' + k, JSON.stringify({
- widgets: v.widgets
- }));
-
- if (v.deck) {
- localStorage.setItem('pizzax::deck::' + k, JSON.stringify({
- columns: v.deck.columns,
- layout: v.deck.layout,
+ if (vuex.device.userData) {
+ for (const [k, v] of Object.entries(vuex.device.userData)) {
+ localStorage.setItem('pizzax::base::' + k, JSON.stringify({
+ widgets: v.widgets
}));
+
+ if (v.deck) {
+ localStorage.setItem('pizzax::deck::' + k, JSON.stringify({
+ columns: v.deck.columns,
+ layout: v.deck.layout,
+ }));
+ }
}
}