Skip to content
This repository has been archived by the owner on Jul 25, 2021. It is now read-only.

Commit

Permalink
optimize '_nodesArray' converter logic
Browse files Browse the repository at this point in the history
  • Loading branch information
clarketm committed May 5, 2017
1 parent 782fd7a commit bb84153
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 18 deletions.
9 changes: 1 addition & 8 deletions dist/js/tableexport.js
Original file line number Diff line number Diff line change
Expand Up @@ -862,14 +862,7 @@
}

function _nodesArray(els) {
var result;
try {
result = [].slice.call(els);
if (!result.length) throw Error();
} catch (e) {
result = [].concat(els);
}
return result;
return (typeof els.length === 'undefined') ? [].concat(els) : [].slice.call(els);
}

function _hasClass(el, cls) {
Expand Down
2 changes: 1 addition & 1 deletion dist/js/tableexport.min.js

Large diffs are not rendered by default.

9 changes: 1 addition & 8 deletions src/stable/js/tableexport.js
Original file line number Diff line number Diff line change
Expand Up @@ -862,14 +862,7 @@
}

function _nodesArray(els) {
var result;
try {
result = [].slice.call(els);
if (!result.length) throw Error();
} catch (e) {
result = [].concat(els);
}
return result;
return (typeof els.length === 'undefined') ? [].concat(els) : [].slice.call(els);
}

function _hasClass(el, cls) {
Expand Down
2 changes: 1 addition & 1 deletion src/stable/js/tableexport.min.js

Large diffs are not rendered by default.

0 comments on commit bb84153

Please sign in to comment.