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

@ -8,6 +8,7 @@ import Operation from "../Operation";
import OperationError from "../errors/OperationError";
import { isImage } from "../lib/FileType";
import { toBase64 } from "../lib/Base64";
import { isWorkerEnvironment } from "../Utils";
import jimp from "jimp";
/**
@ -131,7 +132,7 @@ class AddTextToImage extends Operation {
throw new OperationError(`Error loading image. (${err})`);
}
try {
if (ENVIRONMENT_IS_WORKER())
if (isWorkerEnvironment())
self.sendStatusMessage("Adding text to image...");
const fontsMap = {};