[WebHost] Do not calculate settingHash multiple times in weighted-settings
This commit is contained in:
parent
535c35310d
commit
3f43051c35
|
@ -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))) {
|
||||||
|
|
Loading…
Reference in New Issue