mirror of
https://github.com/TiddlyWiki/TiddlyWiki5.git
synced 2026-04-29 20:36:48 +00:00
Update wiki.readFiles() to call the callback just once
Now we accumulate the results and just pass them to the callback once.
This commit is contained in:
@@ -90,8 +90,8 @@ DropZoneWidget.prototype.handleDropEvent = function(event) {
|
||||
// Try to import the various data types we understand
|
||||
this.importData(dataTransfer);
|
||||
// Import any files in the drop
|
||||
this.wiki.readFiles(dataTransfer.files,function(tiddlerFields) {
|
||||
self.dispatchEvent({type: "tw-import-tiddlers", param: JSON.stringify([tiddlerFields])});
|
||||
this.wiki.readFiles(dataTransfer.files,function(tiddlerFieldsArray) {
|
||||
self.dispatchEvent({type: "tw-import-tiddlers", param: JSON.stringify(tiddlerFieldsArray)});
|
||||
});
|
||||
// Tell the browser that we handled the drop
|
||||
event.preventDefault();
|
||||
|
||||
Reference in New Issue
Block a user