Skip to content

Commit

Permalink
Update packages/babel-helpers/src/helpers/checkInRHS.js
Browse files Browse the repository at this point in the history
Co-authored-by: Nicol貌 Ribaudo <nicolo.ribaudo@gmail.com>
  • Loading branch information
JLHwung and nicolo-ribaudo committed Nov 8, 2022
1 parent d4a066a commit 5d9dccc
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions packages/babel-helpers/src/helpers/checkInRHS.js
@@ -1,9 +1,7 @@
/* @minVersion 7.20.1 */

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

0 comments on commit 5d9dccc

Please sign in to comment.