You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
ERROR: Map does not contain key: "a"
test/target/app.main.wsim.537045.tmp/.wing/preflight.js:9
super(scope, id);
const m = ({"a": "azz"});
>> const b = ((obj, key) => { if (obj["key"] === undefined) throw new Error(`Map does not contain key: "${key}"`); return obj["key"]; })(m, "a");
}
}
I expected this:
b == nil
Is there a workaround?
No response
Component
Compiler
Wing Version
No response
Node.js Version
No response
Platform(s)
No response
Anything else?
Perhaps we might be able to change the output js to null instead of undefined?
Community Notes
Please vote by adding a 👍 reaction to the issue to help us prioritize.
If you are interested to work on this issue, please leave a comment.
The text was updated successfully, but these errors were encountered:
hasanaburayyan
changed the title
Map.get() does not work well with Map of optional types
Map.get() does not play well with Map of optional types
Oct 12, 2023
I tried this:
This happened:
I expected this:
b
==nil
Is there a workaround?
No response
Component
Compiler
Wing Version
No response
Node.js Version
No response
Platform(s)
No response
Anything else?
Perhaps we might be able to change the output js to null instead of undefined?
Community Notes
The text was updated successfully, but these errors were encountered: