Skip to content
This repository has been archived by the owner on Jan 22, 2025. It is now read-only.

Commit

Permalink
Performance
Browse files Browse the repository at this point in the history
  • Loading branch information
jhsware committed Jun 11, 2021
1 parent 23a445c commit e9b0aaa
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -79,11 +79,11 @@ export function animationIsRunningOnParent(node) {
return (node.closest && node.closest('.InfernoAnimation--noAnim'))
}

function _getMaxTransitionDuration (/* add nodes as args*/) {
function _getMaxTransitionDuration (nodes) {
let nrofTransitions = 0
let maxDuration = 0
for (let i=0; i < arguments.length; i++) {
const node = arguments[i]
for (let i=0; i < nodes.length; i++) {
const node = nodes[i]
if (!node) continue

const cs = window.getComputedStyle(node)
Expand Down Expand Up @@ -151,7 +151,7 @@ export function registerTransitionListener(nodes, callback, noTimeout) {
/**
* Here comes the transition event listener
*/
let { nrofTransitions: nrofTransitionsLeft, maxDuration } = _getMaxTransitionDuration.apply(this, nodes)
let { nrofTransitions: nrofTransitionsLeft, maxDuration } = _getMaxTransitionDuration(nodes)
let done = false

function onTransitionEnd (event) {
Expand Down

0 comments on commit e9b0aaa

Please sign in to comment.