chore(components): [tour] remove redundant check for 'open' variable (#18668)

refactor(components): [tour] remove redundant check for 'open' variable

The check for 'open.value == true' was unnecessary since 'open' is already verified to be non-null
earlier in the code.
This commit is contained in:
Zhong 2024-10-27 14:32:08 +08:00 committed by GitHub
parent 9c168ecf36
commit d7dfce37e7
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -71,7 +71,7 @@ export const useTarget = (
posInfo.value = null
return
}
if (!isInViewPort(targetEl) && open.value) {
if (!isInViewPort(targetEl)) {
targetEl.scrollIntoView(scrollIntoViewOptions.value)
}
const { left, top, width, height } = targetEl.getBoundingClientRect()