Skip to content

Commit

Permalink
Merge pull request #4 from Namchee/eval-fix
Browse files Browse the repository at this point in the history
refactor: Remove unnecessary undefined check from delay function
  • Loading branch information
Namchee authored Sep 9, 2020
2 parents b672b24 + f614880 commit f2ae72f
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/util/dom.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,11 +65,10 @@ function generateTransitionString(
key: string,
): string {
const duration = `${props[key]?.duration || defaultTransitionSpeed.value}ms`;
const easingFunc = props[key]?.easing || defaultEasingFunction.value;
/* eslint-disable-next-line */
const delay = `${props[key]?.delay !== undefined ? props[key].delay : defaultDelay.value}ms`;
const easing = props[key]?.easing || defaultEasingFunction.value;
const delay = `${props[key]?.delay || defaultDelay.value}ms`;

return `${cssProp} ${duration} ${easingFunc} ${delay}`;
return `${cssProp} ${duration} ${easing} ${delay}`;
}

/**
Expand Down

0 comments on commit f2ae72f

Please sign in to comment.