diff --git a/npm/packs/select2/src/select2-bootstrap-modal-patch.js b/npm/packs/select2/src/select2-bootstrap-modal-patch.js index 1fee6e798d..d7b5d2d9c4 100644 --- a/npm/packs/select2/src/select2-bootstrap-modal-patch.js +++ b/npm/packs/select2/src/select2-bootstrap-modal-patch.js @@ -1,4 +1,6 @@ /* https://select2.org/troubleshooting/common-problems */ -$.fn.modal.Constructor.prototype._enforceFocus = function () { }; \ No newline at end of file +if ($.fn.modal) { + $.fn.modal.Constructor.prototype._enforceFocus = function () { }; +}