Skip to content

Commit

Permalink
chore: minor
Browse files Browse the repository at this point in the history
  • Loading branch information
Soare-Robert-Daniel committed Sep 21, 2023
1 parent be27fe4 commit 168b694
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/animation/editor.js
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ function AnimationControls({
useEffect( () => {
setNodeCSS(
attributes.className
.split( ' ' )
?.split( ' ' )
.map( ( i ) => {
if ( i.includes( 'o-anim-value-delay-' ) ) {
return `.${ i } { animation-delay: ${ i.replace( 'o-anim-value-delay-', '' ) }; --webkit-animation-delay: ${ i.replace( 'o-anim-value-delay-', '' ) }; }`;
Expand All @@ -225,7 +225,7 @@ function AnimationControls({
}
return '';
})
.filter( ( i ) => i )
.filter( ( i ) => i ) ?? ''
);

}, [ attributes.className ]);
Expand Down
2 changes: 1 addition & 1 deletion src/animation/frontend.js
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,7 @@ const isElementInViewport = ( el ) => {
let scroll = window.scrollY || window.pageYOffset;
const offset = calculateOffset( getTriggerOffset( el ) );

const boundsTop = el.getBoundingClientRect().top + scroll = offset;
const boundsTop = el.getBoundingClientRect().top + scroll + offset;

const viewport = {
top: scroll,
Expand Down

0 comments on commit 168b694

Please sign in to comment.