mirror of
https://github.com/th-ch/youtube-music.git
synced 2026-01-11 10:31:47 +00:00
Move migrations into separate const
This commit is contained in:
@ -3,10 +3,7 @@ const Store = require("electron-store");
|
|||||||
|
|
||||||
const defaults = require("./defaults");
|
const defaults = require("./defaults");
|
||||||
|
|
||||||
module.exports = new Store({
|
const migrations = {
|
||||||
defaults,
|
|
||||||
clearInvalidConfig: false,
|
|
||||||
migrations: {
|
|
||||||
">=1.7.0": (store) => {
|
">=1.7.0": (store) => {
|
||||||
const enabledPlugins = store.get("plugins");
|
const enabledPlugins = store.get("plugins");
|
||||||
if (!Array.isArray(enabledPlugins)) {
|
if (!Array.isArray(enabledPlugins)) {
|
||||||
@ -22,5 +19,10 @@ module.exports = new Store({
|
|||||||
});
|
});
|
||||||
store.set("plugins", plugins);
|
store.set("plugins", plugins);
|
||||||
},
|
},
|
||||||
},
|
};
|
||||||
|
|
||||||
|
module.exports = new Store({
|
||||||
|
defaults,
|
||||||
|
clearInvalidConfig: false,
|
||||||
|
migrations,
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user