mirror of
https://github.com/TeamPiped/Piped.git
synced 2026-08-21 05:01:25 +00:00
Use getPreference* instead of accessing localStorage directly
This commit is contained in:
@@ -371,9 +371,8 @@ export default {
|
||||
"selectedSkip",
|
||||
"sponsor,interaction,selfpromo,music_offtopic",
|
||||
).split(",");
|
||||
const skipOptionsJSON = localStorage.getItem("skipOptions");
|
||||
if (skipOptionsJSON !== null) {
|
||||
const skipOptions = JSON.parse(skipOptionsJSON);
|
||||
const skipOptions = this.getPreferenceJSON("skipOptions");
|
||||
if (skipOptions !== null) {
|
||||
selectedSkip = Object.keys(skipOptions).filter(
|
||||
k => skipOptions[k] !== undefined && skipOptions[k] !== "no",
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user