bitpay / bitcore-lib

A pure and powerful JavaScript Bitcoin library
https://bitcore.io/
Other
613 stars 1.03k forks source link

Fix double import breakage #220

Open Stilldabomb opened 6 years ago

Stilldabomb commented 6 years ago

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

Stilldabomb commented 6 years ago

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

fanatid commented 6 years ago

@Stilldabomb this will done when you fix instanceof problem: https://github.com/bitpay/bitcore/pull/1165

Stilldabomb commented 6 years ago

@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 commented 6 years ago

@fanatid

image

Stilldabomb commented 6 years ago

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

image

Stilldabomb commented 6 years ago

@fanatid nothing?