()
| 5076 | // This variable should be used *only* inside the cacheState function. |
| 5077 | var lastCachedState = null; |
| 5078 | function cacheState() { |
| 5079 | // This should be the only place in $browser where `history.state` is read. |
| 5080 | cachedState = window.history.state; |
| 5081 | cachedState = isUndefined(cachedState) ? null : cachedState; |
| 5082 | |
| 5083 | // Prevent callbacks fo fire twice if both hashchange & popstate were fired. |
| 5084 | if (equals(cachedState, lastCachedState)) { |
| 5085 | cachedState = lastCachedState; |
| 5086 | } |
| 5087 | lastCachedState = cachedState; |
| 5088 | } |
| 5089 | |
| 5090 | function fireUrlChange() { |
| 5091 | if (lastBrowserUrl === self.url() && lastHistoryState === cachedState) { |
no test coverage detected