fix default parameter node variable name
This commit is contained in:
parent
e8810f5124
commit
3c06e68cae
@ -69,14 +69,14 @@ exports.Function = function (node, parent, scope, context, file) {
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
var def = util.template("default-parameter", {
|
var defNode = util.template("default-parameter", {
|
||||||
VARIABLE_NAME: node.params[i],
|
VARIABLE_NAME: node.params[i],
|
||||||
DEFAULT_VALUE: def,
|
DEFAULT_VALUE: def,
|
||||||
ARGUMENT_KEY: t.literal(+i),
|
ARGUMENT_KEY: t.literal(+i),
|
||||||
ARGUMENTS: argsIdentifier
|
ARGUMENTS: argsIdentifier
|
||||||
}, true);
|
}, true);
|
||||||
def._blockHoist = node.defaults.length - i;
|
defNode._blockHoist = node.defaults.length - i;
|
||||||
body.push(def);
|
body.push(defNode);
|
||||||
}
|
}
|
||||||
|
|
||||||
// we need to cut off all trailing default parameters
|
// we need to cut off all trailing default parameters
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user