Skip to content

Commit 168b694

Browse files
chore: minor
1 parent be27fe4 commit 168b694

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/animation/editor.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,7 @@ function AnimationControls({
216216
useEffect( () => {
217217
setNodeCSS(
218218
attributes.className
219-
.split( ' ' )
219+
?.split( ' ' )
220220
.map( ( i ) => {
221221
if ( i.includes( 'o-anim-value-delay-' ) ) {
222222
return `.${ i } { animation-delay: ${ i.replace( 'o-anim-value-delay-', '' ) }; --webkit-animation-delay: ${ i.replace( 'o-anim-value-delay-', '' ) }; }`;
@@ -225,7 +225,7 @@ function AnimationControls({
225225
}
226226
return '';
227227
})
228-
.filter( ( i ) => i )
228+
.filter( ( i ) => i ) ?? ''
229229
);
230230

231231
}, [ attributes.className ]);

src/animation/frontend.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -267,7 +267,7 @@ const isElementInViewport = ( el ) => {
267267
let scroll = window.scrollY || window.pageYOffset;
268268
const offset = calculateOffset( getTriggerOffset( el ) );
269269

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

272272
const viewport = {
273273
top: scroll,

0 commit comments

Comments
 (0)