mirror of
https://github.com/MarioSpore/Grinch-AP.git
synced 2025-10-21 20:21:32 -06:00
[WebHost] Only calculate settingHash once in player-settings
This commit is contained in:
@@ -10,9 +10,9 @@ window.addEventListener('load', () => {
|
|||||||
let settingHash = localStorage.getItem(`${gameName}-hash`);
|
let settingHash = localStorage.getItem(`${gameName}-hash`);
|
||||||
if (!settingHash) {
|
if (!settingHash) {
|
||||||
// If no hash data has been set before, set it now
|
// If no hash data has been set before, set it now
|
||||||
localStorage.setItem(`${gameName}-hash`, md5(results[0]));
|
|
||||||
localStorage.removeItem(gameName);
|
|
||||||
settingHash = md5(results[0]);
|
settingHash = md5(results[0]);
|
||||||
|
localStorage.setItem(`${gameName}-hash`, settingHash);
|
||||||
|
localStorage.removeItem(gameName);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (settingHash !== md5(results[0])) {
|
if (settingHash !== md5(results[0])) {
|
||||||
|
Reference in New Issue
Block a user