File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed
packages/sdk-components-animation/src Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -22,7 +22,10 @@ const namespace = "@webstudio-is/sdk-components-animation";
22
22
23
23
export const hooksAnimateChildren : Hook = {
24
24
onNavigatorUnselect : ( context , event ) => {
25
- if ( event . instancePath [ 0 ] . component === `${ namespace } :${ displayName } ` ) {
25
+ if (
26
+ event . instancePath . length > 0 &&
27
+ event . instancePath [ 0 ] . component === `${ namespace } :${ displayName } `
28
+ ) {
26
29
context . setMemoryProp (
27
30
event . instancePath [ 0 ] ,
28
31
animationCanPlayOnCanvasProperty ,
@@ -31,7 +34,10 @@ export const hooksAnimateChildren: Hook = {
31
34
}
32
35
} ,
33
36
onNavigatorSelect : ( context , event ) => {
34
- if ( event . instancePath [ 0 ] . component === `${ namespace } :${ displayName } ` ) {
37
+ if (
38
+ event . instancePath . length > 0 &&
39
+ event . instancePath [ 0 ] . component === `${ namespace } :${ displayName } `
40
+ ) {
35
41
context . setMemoryProp (
36
42
event . instancePath [ 0 ] ,
37
43
animationCanPlayOnCanvasProperty ,
You can’t perform that action at this time.
0 commit comments