Skip to content

Commit

Permalink
dont override real jquery
Browse files Browse the repository at this point in the history
  • Loading branch information
ateshuseyin committed Oct 18, 2017
1 parent 8c9ffa9 commit 3642c14
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/utils/extender.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ module.exports = ({$, Backbone}) => {
};
}

if ($) {
if ($ && $.prototype.constructor.name !== 'jQuery') {
const fn = $.fn;

const splitNamespace = function(name) {
Expand Down Expand Up @@ -293,8 +293,10 @@ module.exports = ({$, Backbone}) => {
return ar;
}

$.inArray = function(val, arr) {
return arr.indexOf(val);
const indexOf = Array.prototype.indexOf;

$.inArray = function(val, arr, i) {
return arr == null ? -1 : indexOf.call( arr, val, i );
}

$.Event = function(src, props) {
Expand Down

0 comments on commit 3642c14

Please sign in to comment.