-
-
Notifications
You must be signed in to change notification settings - Fork 59
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weβll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unable to morph process.env
values to non-strings
#1032
Comments
After further investigation with More info about this It would be nice if ArkType could somehow detect this, and automatically convert to a standard object via the spread operator ( // apply the morph function and assign the result to the
// corresponding property, or to root if path is empty
if (parent === undefined) this.root = result
else parent[key!] = result
/* Changes are all below */
// `process.env` doesn't allow non-string values,
// so we have to create a copy object.
// https://github.com/nodejs/node/issues/12126
if (typeof result !== "string" && typeof parent[key!] === "string")
parent = {...parent, key: result} |
process.env
values to non-strings
This should be a clone-morph, do we have those? I'm not sure if AT should have exceptions for exotic objects (process.env, localStorage, Proxy instances) |
@Dimava the best workaround for those kind of objects is cloning by ourselves on application level before feeding it to AT? at least for the moment? |
Report a bug
π Search Terms
pipe, object, process.env
𧩠Context
π§βπ» Repro
The text was updated successfully, but these errors were encountered: