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

fix(Forms): Fix use of unpolyfilled structuredClone in useData hook #4108

Merged
merged 2 commits into from
Oct 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions packages/dnb-eufemia/.eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,13 @@
}
]
}
],
"no-restricted-globals": [
"error",
{
"name": "structuredClone",
"message": "Import `structuredClone` from '@ungap/structured-clone' instead."
}
]
}
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,12 @@ import DataContext, {
} from '../../DataContext/Context'
import { SharedAttachments } from '../../DataContext/Provider'

/**
* Deprecated, as it is supported by all major browsers and Node.js >=v18
* So its a question of time, when we will remove this polyfill
*/
import structuredClone from '@ungap/structured-clone'

type PathImpl<T, P extends string> = P extends `${infer Key}/${infer Rest}`
? Key extends keyof T
? Rest extends ''
Expand Down
Loading