Fix clear all button breaking everything.

Rearrange baking a bit to hopefully fix firefox
This commit is contained in:
j433866 2019-05-29 14:08:37 +01:00
parent 476d9c8034
commit 12e4fe4120
3 changed files with 60 additions and 23 deletions

View file

@ -188,8 +188,18 @@ self.bakeAllInputs = function() {
*/
self.bakeInput = function(inputNum, bakeId) {
const inputObj = self.getInputObj(inputNum);
if (inputObj === null || inputObj === undefined) return;
if (inputObj.status !== "loaded") return;
if (inputObj === null ||
inputObj === undefined ||
inputObj.status !== "loaded") {
self.postMessage({
action: "queueInputError",
data: {
inputNum: inputNum,
bakeId: bakeId
}
});
return;
}
let inputData = inputObj.data;
if (typeof inputData !== "string") inputData = inputData.fileBuffer;