diff --git a/.changeset/kind-bottles-battle.md b/.changeset/kind-bottles-battle.md new file mode 100644 index 000000000..bee22d893 --- /dev/null +++ b/.changeset/kind-bottles-battle.md @@ -0,0 +1,5 @@ +--- +"@uppy/golden-retriever": patch +--- + +Fix: Don't restore `currentUploads` if no files are being restored. diff --git a/packages/@uppy/golden-retriever/src/index.ts b/packages/@uppy/golden-retriever/src/index.ts index 92bd7dc0d..0898c374a 100644 --- a/packages/@uppy/golden-retriever/src/index.ts +++ b/packages/@uppy/golden-retriever/src/index.ts @@ -174,7 +174,7 @@ export default class GoldenRetriever< this.uppy.setState({ recoveredState: hasFiles ? recoveredState : null, // recoveredState is used to control the UI (to show the "recovered" state), only set it if we actually have files - currentUploads, + currentUploads: hasFiles ? currentUploads : {}, // if there are no files, no need to restore currentUploads. if we do, and the upload completes (but without completing all files) and the user re-adds some of the *same* files as before, the upload would use a subset of the files the user selected files: filesWithBlobs, })