Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix destructuring of empty string #13444

Merged
merged 4 commits into from Jun 14, 2021
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/babel-helpers/src/helpers.js
Expand Up @@ -903,7 +903,7 @@ helpers.iterableToArrayLimit = helper("7.0.0-beta.0")`
// _i = _iterator
// _s = _step

var _i = arr && (typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]);
var _i = arr == null? null: (typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]);
existentialism marked this conversation as resolved.
Show resolved Hide resolved
if (_i == null) return;

var _arr = [];
Expand Down
@@ -0,0 +1,3 @@
let [a] = '';

expect(undefined).toBe(a)
existentialism marked this conversation as resolved.
Show resolved Hide resolved
@@ -0,0 +1 @@
let [a] = '';
@@ -0,0 +1,3 @@
var _ref = '',
_ref2 = babelHelpers.slicedToArray(_ref, 1),
a = _ref2[0];