mirror of
https://github.com/TeamPiped/Piped.git
synced 2024-11-10 10:18:23 +00:00
Fix for NaN preferences breaking things.
This commit is contained in:
parent
1c5d0f7017
commit
f9bd43a4c3
@ -159,7 +159,8 @@ const mixin = {
|
||||
(value = new URLSearchParams(window.location.search).get(key)) !== null ||
|
||||
(this.testLocalStorage && (value = localStorage.getItem(key)) !== null)
|
||||
) {
|
||||
return Number(value);
|
||||
const num = Number(value);
|
||||
return isNaN(num) ? defaultVal : num;
|
||||
} else return defaultVal;
|
||||
},
|
||||
getPreferenceJSON(key, defaultVal) {
|
||||
|
Loading…
Reference in New Issue
Block a user