Skip to content

Commit

Permalink
@uppy/react: useUppy: fix unmount on NextJS dev mode (#4062)
Browse files Browse the repository at this point in the history
  • Loading branch information
mjesuele committed Aug 30, 2022
1 parent ce88222 commit 8a3665d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/@uppy/react/src/useUppy.js
Expand Up @@ -17,7 +17,7 @@ export default function useUppy (factory) {

useEffect(() => {
return () => {
uppy.current.close({ reason: 'unmount' })
uppy.current?.close({ reason: 'unmount' })
uppy.current = undefined
}
}, [uppy])
Expand Down

0 comments on commit 8a3665d

Please sign in to comment.