What steps will reproduce the bug?
> let a = a || 2;
Uncaught ReferenceError: Cannot access 'a' before initialization
> typeof a !== 'undefined'
Uncaught ReferenceError: a is not defined
> typeof b !== 'undefined'
false
How often does it reproduce? Is there a required condition?
Every single time. If you use let to define a variable and in the assignment part you check if the same variable exists, you won't be able to use typeof after.
What is the expected behavior?
I would expect typeof should always work regardless of the variable a existing or not.
What do you see instead?
Uncaught ReferenceError: a is not defined
Additional information
This appear to be an issue in Chromium since it works as expected in Firefox.
What steps will reproduce the bug?
How often does it reproduce? Is there a required condition?
Every single time. If you use
letto define a variable and in the assignment part you check if the same variable exists, you won't be able to usetypeofafter.What is the expected behavior?
I would expect
typeofshould always work regardless of the variableaexisting or not.What do you see instead?
Uncaught ReferenceError: a is not defined
Additional information
This appear to be an issue in Chromium since it works as expected in Firefox.