Skip to content

Commit

Permalink
fix(view-slot): correct null check against nextElementSibling
Browse files Browse the repository at this point in the history
  • Loading branch information
bryanrsmith committed Mar 4, 2015
1 parent 9f79cbb commit 9162eeb
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/view-slot.js
Expand Up @@ -73,7 +73,7 @@ export class ViewSlot {
// Animate page itself
var element = view.firstChild.nextElementSibling;
if(view.firstChild.nodeType === 8 &&
element !== undefined &&
element !== null &&
element.nodeType === 1 &&
element.classList.contains('au-animate')) {
this.animator.enter(element);
Expand Down Expand Up @@ -120,7 +120,7 @@ export class ViewSlot {

var element = view.firstChild.nextElementSibling;
if(view.firstChild.nodeType === 8 &&
element !== undefined &&
element !== null &&
element.nodeType === 1 &&
element.classList.contains('au-animate')) {
return this.animator.leave(element).then( () => {
Expand All @@ -142,7 +142,7 @@ export class ViewSlot {
var element = child.firstChild.nextElementSibling;
if(child.firstChild !== undefined &&
child.firstChild.nodeType === 8 &&
element !== undefined &&
element !== null &&
element.nodeType === 1 &&
element.classList.contains('au-animate')) {
rmPromises.push(this.animator.leave(element).then( () => {
Expand Down Expand Up @@ -198,7 +198,7 @@ export class ViewSlot {

var element = children[i].firstChild.nextElementSibling;
if(children[i].firstChild.nodeType === 8 &&
element !== undefined &&
element !== null &&
element.nodeType === 1 &&
element.classList.contains('au-animate')) {
this.animator.enter(element);
Expand Down

0 comments on commit 9162eeb

Please sign in to comment.