diff --git a/packages/core/src/animation/Animator.ts b/packages/core/src/animation/Animator.ts index ecf0da396..b3c92ed4e 100644 --- a/packages/core/src/animation/Animator.ts +++ b/packages/core/src/animation/Animator.ts @@ -406,7 +406,7 @@ export class Animator extends Component { handlers.length = 0; for (let j = scriptCount - 1; j >= 0; j--) { const script = scripts[j]; - const handler = script[funcName].bind(script); + const handler = script[funcName]?.bind(script); handler && handlers.push(handler); } eventHandlers.push(eventHandler);