Skip to content

Commit

Permalink
Replace hasOwnProperty with in since we have no prototype value.
Browse files Browse the repository at this point in the history
  • Loading branch information
nathanhammond committed Mar 7, 2018
1 parent 28458cc commit d349e75
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions lib/router/handler-info.js
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ export default class HandlerInfo {

// Don't set a context on the resolution unless we actually have one.
var contextsMatch = resolvedContext === this.context;
if (this.hasOwnProperty('context') || !contextsMatch) {
if ('context' in this || !contextsMatch) {
resolution.context = resolvedContext;
}

Expand All @@ -208,7 +208,7 @@ export default class HandlerInfo {
var contextsMatch = other.context === this.context;
return (
other.name !== this.name ||
(this.hasOwnProperty('context') && !contextsMatch) ||
('context' in this && !contextsMatch) ||
(this.hasOwnProperty('params') && !paramsMatch(this.params, other.params))
);
}
Expand Down
2 changes: 1 addition & 1 deletion lib/router/transition-intent/named-transition-intent.js
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ export default class NamedTransitionIntent extends TransitionIntent {
var oldContext = oldHandlerInfo && oldHandlerInfo.context;
if (
result.names.length > 0 &&
oldHandlerInfo.hasOwnProperty('context') &&
'context' in oldHandlerInfo &&
newHandlerInfo.context === oldContext
) {
// If contexts match in isActive test, assume params also match.
Expand Down

0 comments on commit d349e75

Please sign in to comment.