@uppy/golden-retriever
Advanced tools
Comparing version 2.1.1 to 2.1.2
# @uppy/golden-retriever | ||
## 2.1.2 | ||
Released: 2022-09-25 | ||
Included in: Uppy v2.13.6 | ||
- @uppy/golden-retriever: Fix endless webcam re-render with Golden Retriever (Merlijn Vos / #4111) | ||
## 2.1.0 | ||
@@ -4,0 +11,0 @@ |
@@ -14,3 +14,3 @@ "use strict"; | ||
const packageJson = { | ||
"version": "2.1.1" | ||
"version": "2.1.2" | ||
}; | ||
@@ -127,3 +127,2 @@ /** | ||
this.uppy.log('[GoldenRetriever] No files need to be loaded, only restoring processing state...'); | ||
this.onBlobsLoaded([]); | ||
} | ||
@@ -230,5 +229,8 @@ }; | ||
if (Object.keys(filesToSave).length === 0) { | ||
this.uppy.setState({ | ||
recoveredState: null | ||
}); | ||
if (this.uppy.getState().recoveredState !== null) { | ||
this.uppy.setState({ | ||
recoveredState: null | ||
}); | ||
} | ||
MetaDataStore.cleanup(this.uppy.opts.id); | ||
@@ -384,3 +386,6 @@ return; | ||
this.uppy.on('file-editor:complete', this.replaceBlobInStores); | ||
this.uppy.on('file-removed', this.removeBlobFromStores); | ||
this.uppy.on('file-removed', this.removeBlobFromStores); // TODO: the `state-update` is bad practise. It fires on any state change in Uppy | ||
// or any state change in any of the plugins. We should to able to only listen | ||
// for the state changes we need, somehow. | ||
this.uppy.on('state-update', this.saveFilesStateToLocalStorage); | ||
@@ -387,0 +392,0 @@ this.uppy.on('restore-confirmed', this.handleRestoreConfirmed); |
{ | ||
"name": "@uppy/golden-retriever", | ||
"description": "The GoldenRetriever Uppy plugin saves selected files in browser cache to seamlessly resume uploding after browser crash or accidentally closed tab", | ||
"version": "2.1.1", | ||
"version": "2.1.2", | ||
"license": "MIT", | ||
@@ -28,8 +28,8 @@ "main": "lib/index.js", | ||
"@transloadit/prettier-bytes": "0.0.7", | ||
"@uppy/utils": "^4.1.2", | ||
"@uppy/utils": "^4.1.3", | ||
"lodash.throttle": "^4.1.1" | ||
}, | ||
"peerDependencies": { | ||
"@uppy/core": "^2.3.3" | ||
"@uppy/core": "^2.3.4" | ||
} | ||
} |
@@ -116,3 +116,5 @@ import throttle from 'lodash.throttle' | ||
if (Object.keys(filesToSave).length === 0) { | ||
this.uppy.setState({ recoveredState: null }) | ||
if (this.uppy.getState().recoveredState !== null) { | ||
this.uppy.setState({ recoveredState: null }) | ||
} | ||
MetaDataStore.cleanup(this.uppy.opts.id) | ||
@@ -354,3 +356,2 @@ return | ||
this.uppy.log('[GoldenRetriever] No files need to be loaded, only restoring processing state...') | ||
this.onBlobsLoaded([]) | ||
} | ||
@@ -366,2 +367,5 @@ } | ||
this.uppy.on('file-removed', this.removeBlobFromStores) | ||
// TODO: the `state-update` is bad practise. It fires on any state change in Uppy | ||
// or any state change in any of the plugins. We should to able to only listen | ||
// for the state changes we need, somehow. | ||
this.uppy.on('state-update', this.saveFilesStateToLocalStorage) | ||
@@ -368,0 +372,0 @@ this.uppy.on('restore-confirmed', this.handleRestoreConfirmed) |
Sorry, the diff of this file is not supported yet
106310
1524
Updated@uppy/utils@^4.1.3