Skip to content

Commit

Permalink
Build new release.
Browse files Browse the repository at this point in the history
  • Loading branch information
Jordan Humphreys committed Apr 14, 2016
1 parent 67c8617 commit 1a72cd2
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion dist/tribute.js
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,13 @@ if (!Array.prototype.find) {
throw new Error('[Tribute] Must pass in a DOM node or NodeList.');
}

if (el.constructor === NodeList || el.constructor === HTMLCollection) {
// Check if it is a jQuery collection
if (typeof jQuery !== 'undefined' && el instanceof jQuery) {
el = el.get();
}

// Is el an Array/Array-like object?
if (el.constructor === NodeList || el.constructor === HTMLCollection || el.constructor === Array) {
var length = el.length;
for (var i = 0; i < length; ++i) {
this._attach(el[i]);
Expand Down

0 comments on commit 1a72cd2

Please sign in to comment.