Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
if (args[0].type === Literal) { // scale dependency
name = args[0].value;
var scaleName = scalePrefix + name;
if (!params.hasOwnProperty(scaleName)) {
try {
params[scaleName] = scope.scaleRef(name);
} catch (err) {
// TODO: error handling? warning?
}
}
}
else if (args[0].type === Identifier) { // forward reference to signal
name = args[0].name;
args[0] = new ASTNode(Literal);
args[0].raw = '{signal:"' + name + '"}';
}
}
if (args[0].type === Literal) { // scale dependency
name = args[0].value;
var scaleName = scalePrefix + name;
if (!params.hasOwnProperty(scaleName)) {
try {
params[scaleName] = scope.scaleRef(name);
} catch (err) {
// TODO: error handling? warning?
}
}
}
else if (args[0].type === Identifier) { // forward reference to signal
name = args[0].name;
args[0] = new ASTNode(Literal);
args[0].raw = '{signal:"' + name + '"}';
}
}