Essentially what is happening is that if you select a number of files at the same time with the system file picker, the async call:
fileToDataURL(files[i]).then(function (dataURL) {
imageResult.dataURL = dataURL;
});
results in dataURL being set only on the final image.