Browse Source

Merge pull request #432 from ateshuseyin/maybe-jquery

Avoid $ extending in case of jQuery
pull/437/head
Artur Arseniev 9 years ago
committed by GitHub
parent
commit
ea5537227f
  1. 8
      src/utils/extender.js

8
src/utils/extender.js

@ -51,7 +51,7 @@ module.exports = ({$, Backbone}) => {
}; };
} }
if ($) { if ($ && $.prototype.constructor.name !== 'jQuery') {
const fn = $.fn; const fn = $.fn;
const splitNamespace = function(name) { const splitNamespace = function(name) {
@ -293,8 +293,10 @@ module.exports = ({$, Backbone}) => {
return ar; return ar;
} }
$.inArray = function(val, arr) { const indexOf = Array.prototype.indexOf;
return arr.indexOf(val);
$.inArray = function(val, arr, i) {
return arr == null ? -1 : indexOf.call( arr, val, i );
} }
$.Event = function(src, props) { $.Event = function(src, props) {

Loading…
Cancel
Save