Skip to content
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

Effector-vue supports only primitive types #975

Open
neomastertlt opened this issue Sep 19, 2023 · 1 comment
Open

Effector-vue supports only primitive types #975

neomastertlt opened this issue Sep 19, 2023 · 1 comment
Labels
effector-vue effector-vue package enhancement New feature or request

Comments

@neomastertlt
Copy link

export function deepCopy<T>(obj, cache = []): T {

if you call a function and pass an object containing a date as an argument, the function will not work correctly
console.log(deepCopy({ a: new Date() }));
{ a: new Date() } => { a: {} }

@zerobias
Copy link
Member

zerobias commented Sep 19, 2023

Yes, in this case library supports only primitives, as it's hard to support each case, we could switch to native structuredClone when it will have broader support

@zerobias zerobias changed the title function deepCopy cannot copy dates Effector-vue supports only primitive types Sep 19, 2023
@zerobias zerobias added enhancement New feature or request effector-vue effector-vue package labels Sep 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
effector-vue effector-vue package enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants