You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
resetLoader removes a host-injected embed script tag and global it does not own #32
On a page where the host (or another library, or a second non-React embed) owns window.ImageEditor, a versioned-bundle load failure inside our component removes a DOM node we never created and deletes a global we do not own. Any other consumer of the embed on that page breaks, and nothing tells them why.
This is the exact scenario the reuse logic on line 52 was written to support, so the two halves of the module currently disagree about ownership.
Suggested fix
Record ownership when the tag is created — a flag on TrackedLoad, a data- attribute, or a module-level WeakSet of tags we injected — and have resetLoader only remove the tag / delete the global when we own them. When we don't, evict the cached promise (and abort pending waiters) but leave the page's own state alone.
Activity