MCPcopy Create free account
hub / github.com/OpenReservation/OpenReservation / cacheState

Function cacheState

OpenReservation/wwwroot/Scripts/angular.js:5993–6003  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

5991 var lastCachedState = null;
5992
5993 function cacheState() {
5994 // This should be the only place in $browser where `history.state` is read.
5995 cachedState = getCurrentState();
5996 cachedState = isUndefined(cachedState) ? null : cachedState;
5997
5998 // Prevent callbacks fo fire twice if both hashchange & popstate were fired.
5999 if (equals(cachedState, lastCachedState)) {
6000 cachedState = lastCachedState;
6001 }
6002 lastCachedState = cachedState;
6003 }
6004
6005 function fireUrlChange() {
6006 if (lastBrowserUrl === self.url() && lastHistoryState === cachedState) {

Callers 2

BrowserFunction · 0.85

Calls 3

getCurrentStateFunction · 0.85
isUndefinedFunction · 0.85
equalsFunction · 0.85

Tested by

no test coverage detected