Skip to content

Commit

Permalink
fix helper syntax
Browse files Browse the repository at this point in the history
  • Loading branch information
JLHwung committed Nov 8, 2022
1 parent a3ec863 commit 5db231a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/babel-helpers/src/helpers-generated.ts
Expand Up @@ -43,7 +43,7 @@ export default Object.freeze({
),
checkInRHS: helper(
"7.20.1",
'export default function _checkInRHS(value){var type=typeof value;if("object"!==type&&"function"!==type)throw TypeError("right-hand side of \'in\' should be an object, got "+type);return value}',
"export default function _checkInRHS(value){if(Object(value)!==value)throw TypeError(\"right-hand side of 'in' should be an object, got \"+typeof value);return value}",
),
jsx: helper(
"7.0.0-beta.0",
Expand Down
5 changes: 4 additions & 1 deletion packages/babel-helpers/src/helpers/checkInRHS.js
Expand Up @@ -2,6 +2,9 @@

export default function _checkInRHS(value) {
if (Object(value) !== value) {
throw TypeError("right-hand side of 'in' should be an object, got " + typeof type);
throw TypeError(
"right-hand side of 'in' should be an object, got " + typeof value
);
}
return value;
}

0 comments on commit 5db231a

Please sign in to comment.