From e16e3354868a3c5883e35e1d5aef007a26e8bd18 Mon Sep 17 00:00:00 2001 From: ollyhayes Date: Mon, 6 Mar 2017 14:14:56 +0000 Subject: [PATCH] Pass knockout reference into main script body Required when consuming as a global module by SystemJS. SystemJS will set window.ko = knockout only during the script initialisation, after which window.ko will be undefined. This now works the same as with jQuery. --- dist/js/bootstrap-multiselect.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dist/js/bootstrap-multiselect.js b/dist/js/bootstrap-multiselect.js index 9a50a18a..537d03ff 100644 --- a/dist/js/bootstrap-multiselect.js +++ b/dist/js/bootstrap-multiselect.js @@ -41,7 +41,7 @@ * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -!function ($) { +!function ($, ko) { "use strict";// jshint ;_; if (typeof ko !== 'undefined' && ko.bindingHandlers && !ko.bindingHandlers.multiselect) { @@ -1713,4 +1713,4 @@ $("select[data-role=multiselect]").multiselect(); }); -}(window.jQuery); +}(window.jQuery, window.ko);