Skip to content

Commit 2fa8f6c

Browse files
committed
check if undefined instead of only checking for jquery existence
1 parent 650363e commit 2fa8f6c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

slider.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ angular.module('ui.bootstrap-slider', [])
130130
}
131131

132132
// check if slider jQuery plugin exists
133-
if ('$' in window && $.fn.slider) {
133+
if (typeof window.$ !== 'undefined' && typeof $.fn === 'object' && $.fn.slider)
134134
// adding methods to jQuery slider plugin prototype
135135
$.fn.slider.constructor.prototype.disable = function () {
136136
this.picker.off();

0 commit comments

Comments
 (0)