Handle _blockHoist value of zero safely
This commit is contained in:
parent
b2e3a73e2f
commit
4eb1a45f02
@ -829,7 +829,7 @@ export default class Scope {
|
|||||||
|
|
||||||
var unique = opts.unique;
|
var unique = opts.unique;
|
||||||
var kind = opts.kind || "var";
|
var kind = opts.kind || "var";
|
||||||
var blockHoist = opts._blockHoist || 2;
|
var blockHoist = opts._blockHoist == null ? 2 : opts._blockHoist;
|
||||||
|
|
||||||
var dataKey = `declaration:${kind}:${blockHoist}`;
|
var dataKey = `declaration:${kind}:${blockHoist}`;
|
||||||
var declar = !unique && path.getData(dataKey);
|
var declar = !unique && path.getData(dataKey);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user