MCPcopy
hub / github.com/Postcatlab/postcat / cacheState

Function cacheState

src/workbench/browser/src/ng1/lib/angular/angular.js:6865–6877  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

6863 var lastCachedState = null;
6864
6865 function cacheState() {
6866 // This should be the only place in $browser where `history.state` is read.
6867 cachedState = getCurrentState();
6868 cachedState = isUndefined(cachedState) ? null : cachedState;
6869
6870 // Prevent callbacks fo fire twice if both hashchange & popstate were fired.
6871 if (equals(cachedState, lastCachedState)) {
6872 cachedState = lastCachedState;
6873 }
6874
6875 lastCachedState = cachedState;
6876 lastHistoryState = cachedState;
6877 }
6878
6879 function fireStateOrUrlChange() {
6880 var prevLastHistoryState = lastHistoryState;

Callers 2

BrowserFunction · 0.85
fireStateOrUrlChangeFunction · 0.85

Calls 2

isUndefinedFunction · 0.85
equalsFunction · 0.85

Tested by

no test coverage detected