()
| 6749 | // This variable should be used *only* inside the cacheState function. |
| 6750 | var lastCachedState = null; |
| 6751 | function cacheState() { |
| 6752 | // This should be the only place in $browser where `history.state` is read. |
| 6753 | cachedState = getCurrentState(); |
| 6754 | cachedState = isUndefined(cachedState) ? null : cachedState; |
| 6755 | |
| 6756 | // Prevent callbacks fo fire twice if both hashchange & popstate were fired. |
| 6757 | if (equals(cachedState, lastCachedState)) { |
| 6758 | cachedState = lastCachedState; |
| 6759 | } |
| 6760 | |
| 6761 | lastCachedState = cachedState; |
| 6762 | lastHistoryState = cachedState; |
| 6763 | } |
| 6764 | |
| 6765 | function fireStateOrUrlChange() { |
| 6766 | var prevLastHistoryState = lastHistoryState; |
no test coverage detected