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

fix: convert cid before instanceof check #9

Merged
merged 3 commits into from
Sep 2, 2021

Conversation

achingbrain
Copy link
Member

The CID class can be loaded as an ESM or a CJS class which means
instanceof breaks since they are loaded from different places.

Run the passed cid through CID.asCID to convert it to whatever
we think the CID class is before the test.

The `CID` class can be loaded as an ESM or a CJS class which means
`instanceof` breaks since they are loaded from different places.

Run the passed `cid` through `CID.asCID` to convert it to whatever
we think the `CID` class is before the test.
@ipfs ipfs deleted a comment from welcome bot Sep 2, 2021
@achingbrain achingbrain merged commit b442488 into master Sep 2, 2021
@achingbrain achingbrain deleted the fix/covert-cid-before-test branch September 2, 2021 14:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant