Skip to content

Commit

Permalink
Include tag in begin/complete invariant (#16881)
Browse files Browse the repository at this point in the history
  • Loading branch information
sebmarkbage authored Sep 25, 2019
1 parent 0d8c0cd commit a06d181
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
3 changes: 2 additions & 1 deletion packages/react-reconciler/src/ReactFiberBeginWork.js
Original file line number Diff line number Diff line change
Expand Up @@ -3193,8 +3193,9 @@ function beginWork(
}
invariant(
false,
'Unknown unit of work tag. This error is likely caused by a bug in ' +
'Unknown unit of work tag (%s). This error is likely caused by a bug in ' +
'React. Please file an issue.',
workInProgress.tag,
);
}

Expand Down
3 changes: 2 additions & 1 deletion packages/react-reconciler/src/ReactFiberCompleteWork.js
Original file line number Diff line number Diff line change
Expand Up @@ -1285,8 +1285,9 @@ function completeWork(
default:
invariant(
false,
'Unknown unit of work tag. This error is likely caused by a bug in ' +
'Unknown unit of work tag (%s). This error is likely caused by a bug in ' +
'React. Please file an issue.',
workInProgress.tag,
);
}

Expand Down
2 changes: 1 addition & 1 deletion scripts/error-codes/codes.json
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@
"153": "Resuming work not yet implemented.",
"154": "We should always have pending or current props. This error is likely caused by a bug in React. Please file an issue.",
"155": "An indeterminate component should never have mounted. This error is likely caused by a bug in React. Please file an issue.",
"156": "Unknown unit of work tag. This error is likely caused by a bug in React. Please file an issue.",
"156": "Unknown unit of work tag (%s). This error is likely caused by a bug in React. Please file an issue.",
"157": "Invalid type of work. This error is likely caused by a bug in React. Please file an issue.",
"158": "There must be pending props for an initial mount. This error is likely caused by a bug in React. Please file an issue.",
"159": "There should always be pending or memoized props. This error is likely caused by a bug in React. Please file an issue.",
Expand Down

0 comments on commit a06d181

Please sign in to comment.