Require second parameter for Map.set

Converts cover the was relying on the old signature to either use delete or have the correct types
This commit is contained in:
Matt Bierner
2020-01-06 11:41:33 -08:00
parent ab75933a8b
commit af9dddd0fc
6 changed files with 20 additions and 7 deletions

View File

@@ -621,7 +621,10 @@ export class MainThreadTask implements MainThreadTaskShape {
for (let i = 0; i < partiallyResolvedVars.length; i++) {
const variableName = vars[i].substring(2, vars[i].length - 1);
if (resolvedVars && values.variables[vars[i]] === vars[i]) {
result.variables.set(variableName, resolvedVars.get(variableName));
const resolved = resolvedVars.get(variableName);
if (typeof resolved === 'string') {
result.variables.set(variableName, resolved);
}
} else {
result.variables.set(variableName, partiallyResolvedVars[i]);
}