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

Editor: Replace deep clone dependency with native structured clone #11505

Closed
barklund opened this issue May 17, 2022 · 1 comment · Fixed by #11799
Closed

Editor: Replace deep clone dependency with native structured clone #11505

barklund opened this issue May 17, 2022 · 1 comment · Fixed by #11799
Assignees
Labels
P2 Should do soon Package: Story Editor /packages/story-editor Type: Code Quality Things that need a refactor, rewrite or just some good old developer ❤️ Type: Enhancement New feature or improvement of an existing feature

Comments

@barklund
Copy link
Contributor

Feature Description

structuredClone is now available in all browsers. We currently use clone-deep for this purpose, but only in a single place as far as I can tell.

We should remove this dependency and use the browser native alternative.

@barklund barklund added Type: Enhancement New feature or improvement of an existing feature P2 Should do soon Type: Code Quality Things that need a refactor, rewrite or just some good old developer ❤️ Pod: Prometheus Package: Story Editor /packages/story-editor labels May 17, 2022
@swissspidy
Copy link
Collaborator

Yes! Good idea. Support is still rather new in Safari, so with our browserslist config (last 2 Safari versions), this will probably include the structuredClone polyfill from core-js in our bundle, but that's fine.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P2 Should do soon Package: Story Editor /packages/story-editor Type: Code Quality Things that need a refactor, rewrite or just some good old developer ❤️ Type: Enhancement New feature or improvement of an existing feature
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants