Fix the UMD definition for selectize.

Review Request #13736 — Created April 16, 2024 and submitted — Latest diff uploaded

Information

Djblets
release-5.x

Reviewers

We bundle selectize, which is a very old UMD module, built in a way that
makes some poor assumptions. The main poor assumption is that this is
always defined. A modern UMD definition checks globalThis and self
as possible options, and uses those. Not having this meant that we could
hit issues importing this module (or its parent bundle) in a ESM-based
app.

Since newer 0.12.x releases also lack this fix, we're just going to
patch our copy of it for now. In time, we'll want to replace or upgrade
selectize, but that's a far bigger task.

Verified this still worked correctly in Review Board.

Also verified I could now import the containing bundle and not hit
errors about trying to set attributes in undefined.

Commits

Files

    Loading...