()
| 5991 | var lastCachedState = null; |
| 5992 | |
| 5993 | function cacheState() { |
| 5994 | // This should be the only place in $browser where `history.state` is read. |
| 5995 | cachedState = getCurrentState(); |
| 5996 | cachedState = isUndefined(cachedState) ? null : cachedState; |
| 5997 | |
| 5998 | // Prevent callbacks fo fire twice if both hashchange & popstate were fired. |
| 5999 | if (equals(cachedState, lastCachedState)) { |
| 6000 | cachedState = lastCachedState; |
| 6001 | } |
| 6002 | lastCachedState = cachedState; |
| 6003 | } |
| 6004 | |
| 6005 | function fireUrlChange() { |
| 6006 | if (lastBrowserUrl === self.url() && lastHistoryState === cachedState) { |
no test coverage detected