fix: first time uploadMessage called with undefined as parameter (#204)

* fix: first time uploadMessage called with undefined as parameter

- During uploading DICOMs the first time the function is called with
  no parameter -> this leads to the whole upload to be crashing

* Write the function shorter...
This commit is contained in:
Kaspar 2018-06-13 20:13:18 +02:00 committed by Erik Ziegler
parent 4a57ec7137
commit ebb53db4ad

View File

@ -11,7 +11,7 @@ OHIF.studylist.importStudies = filesToImport => {
return new Promise((resolve, reject) => reject('No files to upload'));
}
const uploadMessage = ({ processed, total }) => `Uploaded files: ${processed} / ${total}`;
const uploadMessage = msg => (typeof msg === 'undefined') ? '' : `Uploaded files: ${msg.processed} / ${msg.total}`;
const taskRunHandler = dialog => {
const uploadErrorHandler = fileNames => {