Skip to content

Commit

Permalink
Code optimization (skin.js)
Browse files Browse the repository at this point in the history
  • Loading branch information
IgorA100 authored Jul 4, 2024
1 parent afeddf5 commit 415e5e9
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions web/skins/classic/js/skin.js
Original file line number Diff line number Diff line change
Expand Up @@ -773,12 +773,7 @@ function isJSON (str) {
};

function setCookie(name, value, seconds) {
var newValue = '';
if (typeof value === 'string') {
var newValue = value;
} else {
var newValue = JSON.stringify(value);
}
var newValue = (typeof value === 'string') ? value : JSON.stringify(value);
let expires = "";
if (seconds) {
const date = new Date();
Expand Down

0 comments on commit 415e5e9

Please sign in to comment.