Skip to content

Commit

Permalink
Fix err msg for inequal circ ref (+second, -first).
Browse files Browse the repository at this point in the history
  • Loading branch information
jmm committed Feb 21, 2016
1 parent fd8bdfa commit 6b9e478
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion why.js
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,7 @@ module.exports = function whyNotEqual(value, other) {
otherKeyIsRecursive = other[key] && other[key][key] === other;
if (valueKeyIsRecursive !== otherKeyIsRecursive) {
if (valueKeyIsRecursive) { return 'first argument has a circular reference at key "' + key + '"; second does not'; }
return 'second argument has a circular reference at key "' + key + '"; second does not';
return 'second argument has a circular reference at key "' + key + '"; first does not';
}
if (!valueKeyIsRecursive && !otherKeyIsRecursive) {
keyWhy = whyNotEqual(value[key], other[key]);
Expand Down

0 comments on commit 6b9e478

Please sign in to comment.