Closed mikeal closed 4 years ago
what is this even fixing?
@rvagg this fixes the following error when decoding a PB-based IPLD node:
UnhandledPromiseRejectionWarning: Error: Can't set property: 'Data' is immutable
at ClassIsWrapper.set Data [as Data] (.../node_modules/ipld-dag-pb/src/dag-node/index.js:63:11)
at transform (.../node_modules/@ipld/block/index.js:17:17)
Carson found a good bug in the new safe/unsafe release.
dag-pb
nodes aren’t data model so they don’t return simple types and therefor can’t actually be cloned nicely. this PR special casesdag-pb
in order to fix.