Skip to content

Commit a9d91e2

Browse files
authored
Use optional chaining for jQuery reference
Ref #354
1 parent 2e2f7f2 commit a9d91e2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

django_select2/static/django_select2/django_select2.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
module.exports = factory(require('jquery'))
77
} else {
88
// Browser globals - prefer Django's jQuery to avoid conflicts
9-
factory(window.django.jQuery || jQuery)
9+
factory(window.django?.jQuery || jQuery)
1010
}
1111
}(function ($) {
1212
'use strict'

0 commit comments

Comments
 (0)