Include tag in begin/complete invariant (#16881)
Sebastian Markbåge committed
Sep 25, 2019 at 08:10 UTC
a06d181af081a17bea466eef2bae1bdaaf8a4b5e
3 files changed
+5
-3
packages/react-reconciler/src/ReactFiberBeginWork.js
+2
-1
@@ -3193,8 +3193,9 @@ function beginWork(
3193
}
3194
invariant(
3195
false,
3196
- 'Unknown unit of work tag. This error is likely caused by a bug in ' +
3196
+ 'Unknown unit of work tag (%s). This error is likely caused by a bug in ' +
3197
'React. Please file an issue.',
3198
+ workInProgress.tag,
3199
);
3200
}
3201
packages/react-reconciler/src/ReactFiberCompleteWork.js
+2
-1
@@ -1285,8 +1285,9 @@ function completeWork(
1285
default:
1286
invariant(
1287
false,
1288
- 'Unknown unit of work tag. This error is likely caused by a bug in ' +
1288
+ 'Unknown unit of work tag (%s). This error is likely caused by a bug in ' +
1289
'React. Please file an issue.',
1290
+ workInProgress.tag,
1291
);
1292
}
1293
scripts/error-codes/codes.json
+1
-1
@@ -155,7 +155,7 @@
155
"153": "Resuming work not yet implemented.",
156
"154": "We should always have pending or current props. This error is likely caused by a bug in React. Please file an issue.",
157
"155": "An indeterminate component should never have mounted. This error is likely caused by a bug in React. Please file an issue.",
158
- "156": "Unknown unit of work tag. This error is likely caused by a bug in React. Please file an issue.",
158
+ "156": "Unknown unit of work tag (%s). This error is likely caused by a bug in React. Please file an issue.",
159
"157": "Invalid type of work. This error is likely caused by a bug in React. Please file an issue.",
160
"158": "There must be pending props for an initial mount. This error is likely caused by a bug in React. Please file an issue.",
161
"159": "There should always be pending or memoized props. This error is likely caused by a bug in React. Please file an issue.",