Don't reset custom invidious instances on safari

This commit is contained in:
Ajay 2023-02-24 14:17:02 -05:00
parent 0cdfd68239
commit 41718ea5ae

View file

@ -1,7 +1,7 @@
import * as CompileConfig from "../config.json";
import * as invidiousList from "../ci/invidiouslist.json";
import { Category, CategorySelection, CategorySkipOption, NoticeVisbilityMode, PreviewBarOption, SponsorTime, StorageChangesObject, Keybind, HashedValue, VideoID, SponsorHideType } from "./types";
import { isSafari, keybindEquals } from "./utils/configUtils";
import { keybindEquals } from "./utils/configUtils";
export interface Permission {
canSubmit: boolean;
@ -550,8 +550,7 @@ function migrateOldSyncFormats(config: SBConfig) {
}
// populate invidiousInstances with new instances if 3p support is **DISABLED**
// for safari, update it immediately
if ((isSafari() || !config["supportInvidious"]) && config["invidiousInstances"].length !== invidiousList.length) {
if (!config["supportInvidious"] && config["invidiousInstances"].length !== invidiousList.length) {
config["invidiousInstances"] = invidiousList;
}