()
| 6632 | // This variable should be used *only* inside the cacheState function. |
| 6633 | var lastCachedState = null; |
| 6634 | function cacheState() { |
| 6635 | // This should be the only place in $browser where `history.state` is read. |
| 6636 | cachedState = getCurrentState(); |
| 6637 | cachedState = isUndefined(cachedState) ? null : cachedState; |
| 6638 | |
| 6639 | // Prevent callbacks fo fire twice if both hashchange & popstate were fired. |
| 6640 | if (equals(cachedState, lastCachedState)) { |
| 6641 | cachedState = lastCachedState; |
| 6642 | } |
| 6643 | |
| 6644 | lastCachedState = cachedState; |
| 6645 | lastHistoryState = cachedState; |
| 6646 | } |
| 6647 | |
| 6648 | function fireStateOrUrlChange() { |
| 6649 | var prevLastHistoryState = lastHistoryState; |
no test coverage detected