Skip to content

Commit

Permalink
Use old method of converting NodeList to Array
Browse files Browse the repository at this point in the history
  • Loading branch information
michalsnik committed Jul 9, 2017
1 parent afa38d2 commit 6536eec
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/js/libs/observer.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ function check(mutations) {
if (!mutations) return;

mutations.forEach(mutation => {
const addedNodes = Array.from(mutation.addedNodes)
const removedNodes = Array.from(mutation.removedNodes)
const addedNodes = Array.prototype.slice.call(mutation.addedNodes)
const removedNodes = Array.prototype.slice.call(mutation.removedNodes)

const anyAOSElementAdded = addedNodes.concat(removedNodes)
.filter(el => el.hasAttribute && el.hasAttribute('data-aos'))
Expand Down

0 comments on commit 6536eec

Please sign in to comment.