Skip to content

Commit 6fe8623

Browse files
committed
fix/element-not-found
1 parent 137e4b0 commit 6fe8623

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

packages/canvas/container/src/container.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -468,9 +468,12 @@ const setSelectRect = (
468468

469469
const getElementDurationTime = (elementId?: string) => {
470470
const element = elementId ? querySelectById(elementId) : getDocument().body
471+
let delayTime = 50
472+
if (!element) {
473+
return delayTime
474+
}
471475
const transitionDuration = window.getComputedStyle(element).getPropertyValue('transition-duration')
472476
const transitionDelay = window.getComputedStyle(element).getPropertyValue('transition-delay')
473-
let delayTime = 0
474477
const getMaxMillisecondNumber = (arr: string[]) => {
475478
const millisecondNumber = arr.map((item) => {
476479
const unit = item.slice(-2)

0 commit comments

Comments
 (0)