Skip to content

Commit

Permalink
Merge pull request #314 from tildeio/fix-typo
Browse files Browse the repository at this point in the history
[fixes #313] Fix Typo shouldSupercede -> shouldSupersede
  • Loading branch information
rwjblue authored Nov 9, 2020
2 parents 9b3d00e + 0f616a0 commit 0b6236e
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion lib/router/route-info.ts
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,7 @@ export default class InternalRouteInfo<T extends Route> {
return resolved;
}

shouldSupercede(routeInfo?: InternalRouteInfo<T>) {
shouldSupersede(routeInfo?: InternalRouteInfo<T>) {
// Prefer this newer routeInfo over `other` if:
// 1) The other one doesn't exist
// 2) The names don't match
Expand Down
2 changes: 1 addition & 1 deletion lib/router/transition-intent/named-transition-intent.ts
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ export default class NamedTransitionIntent<T extends Route> extends TransitionIn
}

let handlerToUse = oldHandlerInfo;
if (i >= invalidateIndex || newHandlerInfo.shouldSupercede(oldHandlerInfo)) {
if (i >= invalidateIndex || newHandlerInfo.shouldSupersede(oldHandlerInfo)) {
invalidateIndex = Math.min(i, invalidateIndex);
handlerToUse = newHandlerInfo;
}
Expand Down
2 changes: 1 addition & 1 deletion lib/router/transition-intent/url-transition-intent.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ export default class URLTransitionIntent<T extends Route> extends TransitionInte
}

let oldRouteInfo = oldState.routeInfos[i];
if (statesDiffer || newRouteInfo.shouldSupercede(oldRouteInfo)) {
if (statesDiffer || newRouteInfo.shouldSupersede(oldRouteInfo)) {
statesDiffer = true;
newState.routeInfos[i] = newRouteInfo;
} else {
Expand Down

0 comments on commit 0b6236e

Please sign in to comment.