Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Query script tag by src match rather than relying on it being last in document order #7

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

elivz
Copy link

@elivz elivz commented May 24, 2024

Currently, the fileupload.patch.js script queries its own script tag in order to get the attached settings object by assuming it will be the last script in the document. However that is not always the case, in which case the script breaks and the Assets page is blank.

This PR changes from querying by source order to using querySelector to get the script by filename, which should be more reliable.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant