mirror of
https://github.com/MarioSpore/Grinch-AP.git
synced 2025-10-21 20:21:32 -06:00
[WebHost] Do not calculate settingHash multiple times in weighted-settings
This commit is contained in:
@@ -3,9 +3,9 @@ window.addEventListener('load', () => {
|
|||||||
let settingHash = localStorage.getItem('weighted-settings-hash');
|
let settingHash = localStorage.getItem('weighted-settings-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('weighted-settings-hash', md5(JSON.stringify(results)));
|
|
||||||
localStorage.removeItem('weighted-settings');
|
|
||||||
settingHash = md5(JSON.stringify(results));
|
settingHash = md5(JSON.stringify(results));
|
||||||
|
localStorage.setItem('weighted-settings-hash', settingHash);
|
||||||
|
localStorage.removeItem('weighted-settings');
|
||||||
}
|
}
|
||||||
|
|
||||||
if (settingHash !== md5(JSON.stringify(results))) {
|
if (settingHash !== md5(JSON.stringify(results))) {
|
||||||
|
Reference in New Issue
Block a user