Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit bf5053b

Browse files
committed
Fix jscodeshift "TypeError: Cannot read property 'expression' of undefined"
jscodeshift does not like if else syntax without { }
1 parent e9df2c2 commit bf5053b

File tree

1 file changed

+5
-2
lines changed
  • packages/react-form-with-constraints/src

1 file changed

+5
-2
lines changed

‎packages/react-form-with-constraints/src/assert.ts‎

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@ export function assert(condition: boolean, message?: string): asserts condition
44
// Use compiler option '--downlevelIteration' to allow iterating of iterators.
55
//console.assert(...arguments);
66

7-
if (message === undefined) console.assert(condition);
8-
else console.assert(condition, message);
7+
if (message === undefined) {
8+
console.assert(condition);
9+
} else {
10+
console.assert(condition, message);
11+
}
912
}

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /