Skip to content
This repository has been archived by the owner on Apr 3, 2019. It is now read-only.

Fix double import breakage #220

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
Open

Conversation

Stilldabomb
Copy link

Fixed problem where it would break on double import, causing the program to crash saying there can only be one instance.

Stilldabomb and others added 4 commits March 25, 2018 02:27
Fixed problem where it would break on double import, causing the program to crash saying there can only be one instance.
Wanted to replace with something more useful, but would require a way to double import bitcore-lib.
@Stilldabomb
Copy link
Author

Okay, this is actually done now as far as I can tell.

@fanatid
Copy link
Contributor

fanatid commented Mar 25, 2018

@Stilldabomb this will done when you fix instanceof problem: bitpay/bitcore#1165

@Stilldabomb
Copy link
Author

@fanatid this would fix that issue, as the classes grabbed by libraries self-depending on bitcore-lib will be the global bitcore library, which would be whichever one is generated first. I could add some version checking in there to make sure the versions are the same?

@Stilldabomb
Copy link
Author

Stilldabomb commented Mar 25, 2018

@fanatid

image

@Stilldabomb
Copy link
Author

Added conflict check so old versions don't silently break.

image

@Stilldabomb
Copy link
Author

@fanatid nothing?

' not also include their own bitcore-lib dependency.';
throw new Error(message);

if (global._bitcore !== undefind) {
Copy link
Contributor

Choose a reason for hiding this comment

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

undefined?

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.

None yet

3 participants