()
| 6574 | // This variable should be used *only* inside the cacheState function. |
| 6575 | var lastCachedState = null; |
| 6576 | function cacheState() { |
| 6577 | // This should be the only place in $browser where `history.state` is read. |
| 6578 | cachedState = getCurrentState(); |
| 6579 | cachedState = isUndefined(cachedState) ? null : cachedState; |
| 6580 | |
| 6581 | // Prevent callbacks fo fire twice if both hashchange & popstate were fired. |
| 6582 | if (equals(cachedState, lastCachedState)) { |
| 6583 | cachedState = lastCachedState; |
| 6584 | } |
| 6585 | |
| 6586 | lastCachedState = cachedState; |
| 6587 | lastHistoryState = cachedState; |
| 6588 | } |
| 6589 | |
| 6590 | function fireStateOrUrlChange() { |
| 6591 | var prevLastHistoryState = lastHistoryState; |
no test coverage detected