Skip to content

Commit

Permalink
inline-invariant: switch to use false instead of 0 (#3019)
Browse files Browse the repository at this point in the history
  • Loading branch information
IvanGoncharov committed Apr 4, 2021
1 parent 142ca1f commit 60417a9
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions resources/inline-invariant.js
Expand Up @@ -9,14 +9,14 @@
*
* to:
*
* !<cond> ? invariant(0, ...) : undefined;
* (<cond>) || invariant(false ...)
*/
module.exports = function inlineInvariant(context) {
const invariantTemplate = context.template(`
(%%cond%%) || invariant(0, %%args%%)
(%%cond%%) || invariant(false, %%args%%)
`);
const assertTemplate = context.template(`
(%%cond%%) || devAssert(0, %%args%%)
(%%cond%%) || devAssert(false, %%args%%)
`);

return {
Expand Down

0 comments on commit 60417a9

Please sign in to comment.