Skip to content

Commit

Permalink
fix(animation): ele as string selector
Browse files Browse the repository at this point in the history
  • Loading branch information
ciekawy authored and adamdbradley committed Jul 25, 2016
1 parent b19547c commit 9fa31a1
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/animations/animation.ts
Expand Up @@ -68,13 +68,13 @@ export class Animation {
var i: number;

if (ele) {
if (ele.length) {
if (typeof ele === 'string') {
ele = document.querySelectorAll(ele);
for (i = 0; i < ele.length; i++) {
this._addEle(ele[i]);
}

} else if (typeof ele === 'string') {
ele = document.querySelectorAll(ele);
} else if (ele.length) {
for (i = 0; i < ele.length; i++) {
this._addEle(ele[i]);
}
Expand Down

0 comments on commit 9fa31a1

Please sign in to comment.