MCPcopy Index your code
hub / github.com/angular-ui/ui-grid / cacheState

Function cacheState

lib/test/angular/1.5.0/angular.js:5963–5973  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

5961 // This variable should be used *only* inside the cacheState function.
5962 var lastCachedState = null;
5963 function cacheState() {
5964 // This should be the only place in $browser where `history.state` is read.
5965 cachedState = getCurrentState();
5966 cachedState = isUndefined(cachedState) ? null : cachedState;
5967
5968 // Prevent callbacks fo fire twice if both hashchange & popstate were fired.
5969 if (equals(cachedState, lastCachedState)) {
5970 cachedState = lastCachedState;
5971 }
5972 lastCachedState = cachedState;
5973 }
5974
5975 function fireUrlChange() {
5976 if (lastBrowserUrl === self.url() && lastHistoryState === cachedState) {

Callers 2

BrowserFunction · 0.70

Calls 3

getCurrentStateFunction · 0.70
isUndefinedFunction · 0.70
equalsFunction · 0.70

Tested by

no test coverage detected