Skip to content

Commit

Permalink
Remove comment.
Browse files Browse the repository at this point in the history
  • Loading branch information
nathanhammond committed Mar 7, 2018
1 parent dc1c108 commit cb0b43f
Showing 1 changed file with 0 additions and 16 deletions.
16 changes: 0 additions & 16 deletions lib/router/handler-info.js
Original file line number Diff line number Diff line change
Expand Up @@ -237,22 +237,6 @@ export default class HandlerInfo {
}
}

// this is bonkers, we require that `context` be set on on the
// HandlerInfo prototype to null because the checks in
// `NamedTransitionIntent.prototype.applyToHandlers` here
// https://github.com/tildeio/router.js/blob/v1.2.8/lib/router/transition-intent/named-transition-intent.js#L76-L81
// check of `oldHandlerInfo.context === newHandlerInfo.context` and assumes
// that the params _must_ match also in that case.
//
// The only reason `oldHandlerInfo.context` and `newHandlerInfo.context` did not
// match in prior versions is because if the context isn't set yet (on newHandlerInfo)
// is because it inherits the `null` from the prototype vs `undefined` (on
// the oldHandlerInfo).
//
// A future refactoring should remove that conditional, and fix the hand full of
// failing tests.
HandlerInfo.prototype.context = null;

function paramsMatch(a, b) {
if (!a ^ !b) {
// Only one is null.
Expand Down

0 comments on commit cb0b43f

Please sign in to comment.