()
| 5664 | // This variable should be used *only* inside the cacheState function. |
| 5665 | var lastCachedState = null; |
| 5666 | function cacheState() { |
| 5667 | // This should be the only place in $browser where `history.state` is read. |
| 5668 | cachedState = getCurrentState(); |
| 5669 | cachedState = isUndefined(cachedState) ? null : cachedState; |
| 5670 | |
| 5671 | // Prevent callbacks fo fire twice if both hashchange & popstate were fired. |
| 5672 | if (equals(cachedState, lastCachedState)) { |
| 5673 | cachedState = lastCachedState; |
| 5674 | } |
| 5675 | lastCachedState = cachedState; |
| 5676 | } |
| 5677 | |
| 5678 | function fireUrlChange() { |
| 5679 | if (lastBrowserUrl === self.url() && lastHistoryState === cachedState) { |
no test coverage detected