Improve handling of errors.

Add parameter to some update functions for whether or not to set the output
This commit is contained in:
j433866 2019-05-10 13:47:48 +01:00
parent f5442c307a
commit 2c02900edf
3 changed files with 16 additions and 14 deletions

View file

@ -573,13 +573,13 @@ self.loadFiles = function(filesData) {
/**
* Adds an input to the input array
*
* @param {boolean} [changetab=false] - Whether or not to send a message to the main thread that the input has been created
* @param {boolean} [changetab=false] - Whether or not to change to the new input
* @param {string} type - Either "string" or "file"
* @param {Object} fileData - Contains information about the file to be added to the input
* @param {string} fileData.name
* @param {string} fileData.size
* @param {string} fileData.type
* @param {number} inputNum
* @param {number} inputNum - Defaults to auto-incrementing self.currentInputNum
*/
self.addInput = function(changeTab=false, type, fileData={name: "unknown", size: "unknown", type: "unknown"}, inputNum = self.currentInputNum++) {
self.numInputs++;