mirror of
https://github.com/th-ch/youtube-music.git
synced 2026-01-28 10:23:44 +00:00
fix(store): fix TypeError: Cannot convert undefined or null to object
This commit is contained in:
@ -85,7 +85,8 @@ const migrations = {
|
||||
shortcut: unknown;
|
||||
}[]
|
||||
| Record<string, unknown>
|
||||
>;
|
||||
> | undefined;
|
||||
if (options) {
|
||||
let updated = false;
|
||||
for (const optionType of ['global', 'local']) {
|
||||
if (Object.hasOwn(options, optionType) && Array.isArray(options[optionType])) {
|
||||
@ -104,10 +105,10 @@ const migrations = {
|
||||
updated = true;
|
||||
}
|
||||
}
|
||||
|
||||
if (updated) {
|
||||
store.set('plugins.shortcuts', options);
|
||||
}
|
||||
}
|
||||
},
|
||||
'>=1.11.0'(store: Conf<Record<string, unknown>>) {
|
||||
if (store.get('options.resumeOnStart') === undefined) {
|
||||
|
||||
Reference in New Issue
Block a user