Skip to content

Commit

Permalink
session storage should not override URL parameters
Browse files Browse the repository at this point in the history
  • Loading branch information
totaam committed Feb 28, 2024
1 parent ff75c0b commit 68b6318
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions html5/js/Utilities.js
Original file line number Diff line number Diff line change
Expand Up @@ -593,17 +593,19 @@ const Utilities = {
};
}
let value = getParameter(property);
try {
value = Utilities.getSessionStorageValue(property);
} catch {
value = null;
if (value === undefined) {
try {
value = Utilities.getSessionStorageValue(property);
} catch {
value = null;
}
}
return value;
return undefined;
},

getboolparam(property, default_value) {
const v = Utilities.getparam(property);
if (v === null) {
if (v === undefined) {
return default_value;
}
return ["true", "on", "1", "yes", "enabled"].includes(
Expand Down

0 comments on commit 68b6318

Please sign in to comment.