mirror of
https://github.com/simstudioai/sim.git
synced 2026-02-11 23:14:58 -05:00
fix(resolver): consolidate reference resolution (#2941)
* fix(resolver): consolidate code to resolve references * fix edge cases * use already formatted error * fix multi index * fix backwards compat reachability * handle backwards compatibility accurately * use shared constant correctly
This commit is contained in:
committed by
GitHub
parent
4e4149792a
commit
fcd0240db6
@@ -130,7 +130,11 @@ async function executeCode(request) {
|
||||
await jail.set('environmentVariables', new ivm.ExternalCopy(envVars).copyInto())
|
||||
|
||||
for (const [key, value] of Object.entries(contextVariables)) {
|
||||
await jail.set(key, new ivm.ExternalCopy(value).copyInto())
|
||||
if (value === undefined) {
|
||||
await jail.set(key, undefined)
|
||||
} else {
|
||||
await jail.set(key, new ivm.ExternalCopy(value).copyInto())
|
||||
}
|
||||
}
|
||||
|
||||
const fetchCallback = new ivm.Reference(async (url, optionsJson) => {
|
||||
|
||||
Reference in New Issue
Block a user