[fix] Browser's LocalStorage initialisation
This commit is contained in:
parent
221bdaddfd
commit
d0f1e37bcb
2 changed files with 7 additions and 1 deletions
|
|
@ -92,7 +92,7 @@ wn.Application = Class.extend({
|
|||
if(wn.boot.metadata_version != localStorage.metadata_version) {
|
||||
localStorage.clear();
|
||||
console.log("Cleared Cache - New Metadata");
|
||||
localStorage.metadata_version = wn.boot.metadata_version;
|
||||
wn.assets.init_local_storage();
|
||||
}
|
||||
},
|
||||
|
||||
|
|
|
|||
|
|
@ -41,8 +41,14 @@ wn.assets = {
|
|||
localStorage.clear();
|
||||
console.log("Cleared localstorage");
|
||||
}
|
||||
|
||||
wn.assets.init_local_storage();
|
||||
},
|
||||
|
||||
init_local_storage: function() {
|
||||
localStorage._last_load = new Date();
|
||||
localStorage._version_number = window._version_number;
|
||||
if(wn.boot) localStorage.metadata_version = wn.boot.metadata_version;
|
||||
},
|
||||
|
||||
// check if the asset exists in
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue