Skip to content

Commit

Permalink
chore: fix ts error for demo
Browse files Browse the repository at this point in the history
  • Loading branch information
hughfenghen committed Nov 18, 2024
1 parent 27e74c1 commit 202e4ef
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/av-canvas/demo/video-editor.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -383,7 +383,8 @@ function App() {
if (avCvs == null || spr == null || tlState.current == null) return;
const newClips = await spr
.getClip()
.split(tlState.current.getTime() * 1e6 - spr.time.offset);
.split?.(tlState.current.getTime() * 1e6 - spr.time.offset);
if (newClips == null) throw Error('split failed');
// 移除原有对象
avCvs.removeSprite(spr);
actionSpriteMap.delete(action);
Expand Down

0 comments on commit 202e4ef

Please sign in to comment.