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

Fix: Handle undefined django object to prevent TypeError. Fixes: #313 #314

Merged

Conversation

SukiCZ
Copy link
Contributor

@SukiCZ SukiCZ commented Feb 27, 2024

These includes will fix the issue described in #313

EDIT: Includes admin/js/jquery.init.js as defined in django.admin

@SukiCZ
Copy link
Contributor Author

SukiCZ commented Jul 15, 2024

@crucialfelix Could this be merged?

@SukiCZ SukiCZ force-pushed the fix/313-window.django.jQuery branch 2 times, most recently from 66a634a to bb894da Compare September 3, 2024 17:09
@SukiCZ SukiCZ changed the title Include jquery.init.js to define window.django.jQuery outside of Django Admin. Fixes: #313 Fix: Handle undefined django object to prevent TypeError. Fixes: #313 Sep 3, 2024
…ucialfelix#313

- Added a check to ensure `django` is defined before accessing `django.jQuery`.
- This prevents the "Uncaught TypeError: Cannot read properties of undefined (reading 'jQuery')" error.
@SukiCZ SukiCZ force-pushed the fix/313-window.django.jQuery branch from bb894da to 3e6ba31 Compare September 3, 2024 17:14
@crucialfelix crucialfelix merged commit 791e1f8 into crucialfelix:develop Sep 14, 2024
3 checks passed
@crucialfelix
Copy link
Owner

@SukiCZ Thank you!

@SukiCZ SukiCZ deleted the fix/313-window.django.jQuery branch September 14, 2024 13:42
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.

2 participants