Skip to content
This repository has been archived by the owner on Feb 12, 2024. It is now read-only.

fix: use Key.asKey instead of instanceOf #3877

Merged
merged 3 commits into from
Sep 17, 2021

Conversation

achingbrain
Copy link
Member

Using instanceOf is not reliable since instances of classes can cross the CLS/ESM boundary and/or come from different browser bundles.

Instead see if we can treat what we've been handed as a Key by using the Key.asKey method.

Fixes #3852

Using `instanceOf` is not reliable since instances of classes can
cross the CLS/ESM boundary and/or come from different browser bundles.

Instead see if we can treat what we've been handed as a `Key` by
using the `Key.asKey` method.

Fixes #3852
@achingbrain achingbrain merged commit e3acf9b into master Sep 17, 2021
@achingbrain achingbrain deleted the fix/use-key-is-key-not-instanceof branch September 17, 2021 15:40
This was referenced Apr 8, 2022
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.

Not a valid CID; blockstore-datastore-adapter
1 participant