()
| 6593 | // This variable should be used *only* inside the cacheState function. |
| 6594 | var lastCachedState = null; |
| 6595 | function cacheState() { |
| 6596 | // This should be the only place in $browser where `history.state` is read. |
| 6597 | cachedState = getCurrentState(); |
| 6598 | cachedState = isUndefined(cachedState) ? null : cachedState; |
| 6599 | |
| 6600 | // Prevent callbacks fo fire twice if both hashchange & popstate were fired. |
| 6601 | if (equals(cachedState, lastCachedState)) { |
| 6602 | cachedState = lastCachedState; |
| 6603 | } |
| 6604 | |
| 6605 | lastCachedState = cachedState; |
| 6606 | lastHistoryState = cachedState; |
| 6607 | } |
| 6608 | |
| 6609 | function fireStateOrUrlChange() { |
| 6610 | var prevLastHistoryState = lastHistoryState; |
no test coverage detected