()
| 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; |
no test coverage detected