Merge branch '708-async-table-frontend-util-verursacht-ajax-request-schleife' into 'master'

Resolve "async-table frontend-util verursacht ajax-request-Schleife"

Closes #708

See merge request uni2work/uni2work!42
This commit is contained in:
Gregor Kleen 2021-06-10 17:00:58 +00:00
commit 4f3ef8903a
2 changed files with 9 additions and 4 deletions

View File

@ -359,6 +359,11 @@ export class StorageManager {
addHistoryListener(listener, options=this._options, ...args) {
const modified_listener = (function(event, ...listener_args) { // eslint-disable-line no-unused-vars
// do not propagate popstate events with empty state
if(event.state === null)
return;
this._global.setTimeout(() => listener(this._getFromHistory(options), ...listener_args));
}).bind(this);
@ -473,9 +478,9 @@ export class StorageManager {
}
_debugLog() {}
// _debugLog(fName, ...args) {
// console.log(`[DEBUGLOG] StorageManager.${fName}`, { args: args, instance: this });
// }
//_debugLog(fName, ...args) {
// 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');
this._debugLog('_historyListener', historyState, windowUrl, historyUrl);
if (this._isEquivalentUrl(windowUrl, historyUrl))
if (this._isEquivalentUrl(windowUrl, historyUrl || document.location.href))
return;
this._debugLog('_historyListener', historyUrl);