single-spa / import-map-overrides

A browser and NodeJS javascript library for overriding import maps
MIT License
341 stars 47 forks source link

Issue #66 #67

Closed OriolInvernonLlaneza closed 1 year ago

OriolInvernonLlaneza commented 2 years ago

Following issue #66 I added a condition to check if a shadow root is already attached to the element and prevent the exception (https://developer.mozilla.org/en-US/docs/Web/API/Element/attachShadow#exceptions). I tested it with our apps and it seems to work fine.

I don't know if the shadow root already being attached should be handled a different way like removing and recreating it or any other action. But this check seems to work, the import-map ui is rendered and styled correctly on first load and refresh.

image

ryanmaffey commented 2 years ago

@joeldenning Are you able to merge this? 🙏

andersoonluan commented 2 years ago

Is there any update on when this PR is going to be merged?

smilyanp commented 2 years ago

An update on this would be super appreciated, thank you!

moderndegree commented 2 years ago

I am seeing this error as well. If this PR isn't an appropriate fix, can we get some direction on how to correctly fix the issue?

piwysocki commented 1 year ago

@joeldenning Are you able to merge this? 🙏

prof-schnitzel commented 1 year ago

I think this is now fixed by https://github.com/single-spa/import-map-overrides/pull/86

@joeldenning Could you bring a new release with the latest commits?

joeldenning commented 1 year ago

Closed in favor of #86