Bläddra i källkod

restore: Add comment about get-data event.

Renée Kooi 7 år sedan
förälder
incheckning
8147ee0905
1 ändrade filer med 3 tillägg och 0 borttagningar
  1. 3 0
      src/plugins/GoldenRetriever/index.js

+ 3 - 0
src/plugins/GoldenRetriever/index.js

@@ -105,6 +105,9 @@ module.exports = class GoldenRetriever extends Plugin {
     )
     )
 
 
     const pluginData = {}
     const pluginData = {}
+    // TODO Find a better way to do this?
+    // Other plugins can attach a restore:get-data listener that receives this callback.
+    // Plugins can then use this callback (sync) to provide data to be stored.
     this.uppy.emit('restore:get-data', (data) => {
     this.uppy.emit('restore:get-data', (data) => {
       Object.assign(pluginData, data)
       Object.assign(pluginData, data)
     })
     })