update more ENVIRONMENT_IS_* calls after merge, update some test paths, comments. Remove vulnerability

This commit is contained in:
d98762625 2019-07-05 11:35:59 +01:00
parent 368f508b17
commit e03ff22ba8
10 changed files with 31 additions and 19 deletions

View file

@ -9,6 +9,7 @@ import OperationError from "./errors/OperationError";
import Operation from "./Operation";
import DishError from "./errors/DishError";
import log from "loglevel";
import { isWorkerEnvironment } from "./Utils";
// Cache container for modules
let modules = null;
@ -202,7 +203,7 @@ class Recipe {
input = await dish.get(op.inputType);
log.debug(`Executing operation '${op.name}'`);
if (ENVIRONMENT_IS_WORKER()) {
if (isWorkerEnvironment()) {
self.sendStatusMessage(`Baking... (${i+1}/${this.opList.length})`);
self.sendProgressMessage(i + 1, this.opList.length);
}