From 9042b567a3a560724313f68adfd2458e772ba7bf Mon Sep 17 00:00:00 2001 From: maliming Date: Thu, 21 Oct 2021 17:23:38 +0800 Subject: [PATCH] Check `$.fn.modal`. https://github.com/abpframework/abp/pull/10389 --- npm/packs/select2/src/select2-bootstrap-modal-patch.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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 () { }; +}