Skip to content

Commit 60417a9

Browse files
inline-invariant: switch to use false instead of 0 (#3019)
1 parent 142ca1f commit 60417a9

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

resources/inline-invariant.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,14 @@
99
*
1010
* to:
1111
*
12-
* !<cond> ? invariant(0, ...) : undefined;
12+
* (<cond>) || invariant(false ...)
1313
*/
1414
module.exports = function inlineInvariant(context) {
1515
const invariantTemplate = context.template(`
16-
(%%cond%%) || invariant(0, %%args%%)
16+
(%%cond%%) || invariant(false, %%args%%)
1717
`);
1818
const assertTemplate = context.template(`
19-
(%%cond%%) || devAssert(0, %%args%%)
19+
(%%cond%%) || devAssert(false, %%args%%)
2020
`);
2121

2222
return {

0 commit comments

Comments
 (0)