첫 진입 에셋 리로드 방지
This commit is contained in:
1 parent
c6b2260d5a
commit
41454f49c8
1 file changed
+2
-3
@@ -214,15 +214,14 @@
|
|||||||
}).then(function (data) {
|
}).then(function (data) {
|
||||||
if (!data || data.result !== 'ok' || !data.version) return;
|
if (!data || data.result !== 'ok' || !data.version) return;
|
||||||
|
|
||||||
var token = data.version.slice(0, 12);
|
|
||||||
var previous = storeGet(storageKey);
|
var previous = storeGet(storageKey);
|
||||||
var mismatch = loadedAssetMismatch(data.assets);
|
var mismatch = loadedAssetMismatch(data.assets);
|
||||||
var forceReload = bfcacheReturn;
|
var forceReload = bfcacheReturn;
|
||||||
bfcacheReturn = false;
|
bfcacheReturn = false;
|
||||||
storeSet(storageKey, data.version);
|
storeSet(storageKey, data.version);
|
||||||
|
|
||||||
if (assetTokenFromLocation() !== token || mismatch || forceReload) {
|
if (mismatch || forceReload) {
|
||||||
reloadWith(data.version, mismatch || forceReload);
|
reloadWith(data.version, true);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user