Open iambalaam opened 4 years ago
Since raising this PR, I have questioned if both parts of the solution are needed (nativeURL and cloned property descriptor/names). I have now tested and know that cloning the property descriptor/names is enough on its own.
I am now unsure if there are any merits of adding the nativeURL
, or if I should remove that part?
This is my first attempt to solve Cannot clone a URL in Node >= 10 https://github.com/pvorb/clone/issues/109 .
I have had to clone the property descriptors of Symbols, and I assume I should do the same for property names.
When running the following code I found that the
value
wasn't a primitive. This made theURL
object clone to a new object, but theURLSearchParams
inside it point to the same instance. (I have not assessed the performance implications of this.)