Skip to content

fix: only use jquery once it is available - #30571

Merged
skjnldsv merged 1 commit into
masterfrom
fix/missing-jquery
Jan 10, 2022
Merged

fix: only use jquery once it is available#30571
skjnldsv merged 1 commit into
masterfrom
fix/missing-jquery

Conversation

@azul

@azulazul commented Jan 10, 2022

Copy link
Copy Markdown
Contributor

publicpage.js is loaded very early and cannot rely on jquery being loaded already.

Move the use of $ into the DomContentLoaded handler.

publicpage.js is loaded very early and cannot rely on jquery being loaded already.
Move the use of `$` into the `DomContentLoaded` handler.
Signed-off-by: Azul <azul@riseup.net>
@azul
azulforce-pushed the fix/missing-jquery branch from 9a67578 to 94554c4CompareJanuary 10, 2022 13:55
@azul

azul commented Jan 10, 2022

Copy link
Copy Markdown
ContributorAuthor

Noticed this because cypress tests in text started failing complaining:

 > $ is not defined
https://on.cypress.io/uncaught-exception-from-application
at http://localhost:8081/core/js/public/publicpage.js?v=16d6118e-0:36:1

This seems to be the easiest fix for now. Could also rewrite this without relying on jquery - but i guess that's for another time.

@azul
azul requested review from artonge and skjnldsvJanuary 10, 2022 13:57
@artonge

Copy link
Copy Markdown
Collaborator

/rebase

@skjnldsv
skjnldsv merged commit 5faba45 into masterJan 10, 2022
@skjnldsv
skjnldsv deleted the fix/missing-jquery branch January 10, 2022 19:03
@solracsf

Copy link
Copy Markdown
Member

Backport?

@artonge

Copy link
Copy Markdown
Collaborator

/backport to stable23

@artonge

Copy link
Copy Markdown
Collaborator

/backport to stable22

@artonge

Copy link
Copy Markdown
Collaborator

/backport to stable21

@backportbot-nextcloud

Copy link
Copy Markdown

The backport to stable21 failed. Please do this backport manually.

Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3. to reviewWaiting for reviews

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

@azul@artonge@solracsf@skjnldsv