fix: 上传面板关闭动效避开 contextSafe 可能为空
This commit is contained in:
parent
4efdccdd3c
commit
23083c2ef5
@ -265,6 +265,8 @@ export default function UploadModal({ onClose, onSuccess }: UploadModalProps) {
|
||||
)
|
||||
})
|
||||
|
||||
if (!contextSafe) return
|
||||
|
||||
closeAnimatedRef.current = contextSafe(() => {
|
||||
const reduced = window.matchMedia('(prefers-reduced-motion: reduce)').matches
|
||||
if (reduced || !overlayRef.current || !panelRef.current) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user