Skip to content
This repository has been archived by the owner on Aug 11, 2021. It is now read-only.

replace constructor.name with instanceof so uglify can mangle and compress #58

Merged
merged 1 commit into from
Mar 8, 2018

Conversation

ya7ya
Copy link
Contributor

@ya7ya ya7ya commented Mar 8, 2018

this is part of ongoing effort to properly fix ipfs/js-ipfs#1131

it replaces link.constructor.name === 'DAGLink' with a friendlier link instanceof DAGLink

Copy link
Member

@vmx vmx left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@vmx vmx merged commit 881d572 into ipld:master Mar 8, 2018
@dignifiedquire
Copy link
Member

please revert this, there is a reason we don‘t use instanceof anywhere. It breaks for consumers using the library if they bundle a different set of code or the class.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Uncaught Error: Can't set property: 'links' is immutable
3 participants