Comments (3)
Look like the problem you have here is slotElm
isn't a "plain object" and deepmerge is using its default cloning under the hood which only handles cloning of "plain objects".
There are 2 easy solutions to fix this.
Either tell deepmerge to not clone by setting the clone
option to false,
or tell deepmerge that DOM Objects are not mergeable (/cloneable) by setting the isMergableObject
option (see: https://github.com/TehShrike/deepmerge#ismergeableobject - you probably want to use is-plain-object).
from deepmerge.
It is unlikely this will be supported. Unless the implementation used symbol to track where the algorithm has traversed.
DOM objects have references to itself this is why you get RangeError, it is likely to be causing infinite recursion at fails after 50 levels of depth or so.
from deepmerge.
Also I believe most DOM elements have internal state that prevents them from being cloned by userland code.
You probably want Node.cloneNode()
from deepmerge.
Related Issues (20)
- is this library no longer maintained ? HOT 1
- [feature request] more contextual info customMerge HOT 2
- is-mergeable-object is a devDependency HOT 4
- Deepmerge deletes values of ArrayBuffer and replaces to an empty object HOT 4
- How to use one object as target HOT 8
- Deno? HOT 7
- High CPU usage with large object merge HOT 1
- use recursive partial for type definitions HOT 1
- Will we ever see the v5? HOT 4
- When a particular property of the source object is undefined while the target one has a value, the value will be override by undefined HOT 2
- How to delete an element from an array with deepmerge. HOT 1
- How to avoid array concatenation HOT 18
- `is-mergeable-object` is a `devDependency` but used in `index.js` HOT 7
- An error occuren when merge axios config: config.signal.addEventListener is not a function HOT 3
- add ESM, support for module and browser HOT 5
- Possible to remove duplicate objects in arrays? HOT 1
- deepmerge_1.default) is not a function (No Webpack) HOT 4
- A class instance in an array in an object get formed into an object.
- It need filter on merge
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from deepmerge.