fix: added check in async table and removeddebug log output

This commit is contained in:
Johannes Eder 2021-06-10 17:48:22 +02:00 committed by Gregor Kleen
parent 757e148032
commit f807e2af78
2 changed files with 5 additions and 6 deletions

View File

@ -360,7 +360,6 @@ export class StorageManager {
addHistoryListener(listener, options=this._options, ...args) { addHistoryListener(listener, options=this._options, ...args) {
const modified_listener = (function(event, ...listener_args) { // eslint-disable-line no-unused-vars const modified_listener = (function(event, ...listener_args) { // eslint-disable-line no-unused-vars
alert('Event:' + JSON.stringify(event));
//possible solution: popstate event does not have a state //possible solution: popstate event does not have a state
if(event.state === null) if(event.state === null)
@ -479,10 +478,10 @@ export class StorageManager {
}).catch(console.error); }).catch(console.error);
} }
//_debugLog() {} _debugLog() {}
_debugLog(fName, ...args) { //_debugLog(fName, ...args) {
console.log(`[DEBUGLOG] StorageManager.${fName}`, { args: args, instance: this }); // console.log(`[DEBUGLOG] StorageManager.${fName}`, { args: args, instance: this });
} //}
} }

View File

@ -125,7 +125,7 @@ export class AsyncTable {
const historyUrl = historyState ? historyState['currentTableUrl'] : this._historyStorage.load('currentTableUrl'); const historyUrl = historyState ? historyState['currentTableUrl'] : this._historyStorage.load('currentTableUrl');
this._debugLog('_historyListener', historyState, windowUrl, historyUrl); this._debugLog('_historyListener', historyState, windowUrl, historyUrl);
if (this._isEquivalentUrl(windowUrl, historyUrl)) if (this._isEquivalentUrl(windowUrl, historyUrl || document.location.href))
return; return;
this._debugLog('_historyListener', historyUrl); this._debugLog('_historyListener', historyUrl);