Skip to content

Weird behaviour after recent release #10416

@abhinavsingi

Description

@abhinavsingi

Bug Report

Current Behavior
Cannot read property 'name' of null error is coming when babel is parsing.
Since target.node.id is null

Input Code

This code breaks on repl with only es2015 preset selected

const E_ARR = [];

export default function () {
  const someVar = E_ARR;
  return [...someVar];
}

Expected behavior/code
This code is working though

export default function () {
  const E_ARR = [];
  const someVar = E_ARR;
  return [...someVar];
}
const E_ARR = [];

export default function namedFunction() {
  const someVar = E_ARR;
  return [...someVar];
}

Environment

Possible Solution
We believe it's being caused by the latest release this weekend.

Additional context/Screenshots
This same code was working before this weekend's release

Metadata

Metadata

Assignees

No one assigned

    Labels

    Has PRi: regressionoutdatedA closed issue/PR that is archived due to age. Recommended to make a new issue

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions