Linted to satisfy new rules

This commit is contained in:
n1474335 2019-07-05 12:36:15 +01:00
parent e4e32a9c56
commit b272d3b32f
5 changed files with 16 additions and 15 deletions

View file

@ -219,13 +219,14 @@ class InputWaiter {
handleLoaderMessage(e) {
const r = e.data;
if (r.hasOwnProperty("progress") && r.hasOwnProperty("inputNum")) {
if (Object.prototype.hasOwnProperty.call(r, "progress") &&
Object.prototype.hasOwnProperty.call(r, "inputNum")) {
this.manager.tabs.updateInputTabProgress(r.inputNum, r.progress, 100);
} else if (r.hasOwnProperty("fileBuffer")) {
} else if (Object.prototype.hasOwnProperty.call(r, "fileBuffer")) {
this.manager.tabs.updateInputTabProgress(r.inputNum, 100, 100);
}
const transferable = r.hasOwnProperty("fileBuffer") ? [r.fileBuffer] : undefined;
const transferable = Object.prototype.hasOwnProperty.call(r, "fileBuffer") ? [r.fileBuffer] : undefined;
this.inputWorker.postMessage({
action: "loaderWorkerMessage",
data: r
@ -241,7 +242,7 @@ class InputWaiter {
handleInputWorkerMessage(e) {
const r = e.data;
if (!r.hasOwnProperty("action")) {
if (!("action" in r)) {
log.error("A message was received from the InputWorker with no action property. Ignoring message.");
return;
}

View file

@ -651,12 +651,12 @@ class OutputWaiter {
*/
handleZipWorkerMessage(e) {
const r = e.data;
if (!r.hasOwnProperty("zippedFile")) {
if (!("zippedFile" in r)) {
log.error("No zipped file was sent in the message.");
this.terminateZipWorker();
return;
}
if (!r.hasOwnProperty("filename")) {
if (!("filename" in r)) {
log.error("No filename was sent in the message.");
this.terminateZipWorker();
return;

View file

@ -178,7 +178,7 @@ class WorkerWaiter {
let inputNum = 0;
log.debug(`Receiving ${r.action} from ChefWorker.`);
if (r.data.hasOwnProperty("inputNum")) {
if ("inputNum" in r.data) {
inputNum = r.data.inputNum;
}
@ -440,7 +440,7 @@ class WorkerWaiter {
// Remove all breakpoints from the recipe up to progress
if (nextInput.progress !== false) {
for (let i = 0; i < nextInput.progress; i++) {
if (recipeConfig[i].hasOwnProperty("breakpoint")) {
if ("breakpoint" in recipeConfig[i]) {
delete recipeConfig[i].breakpoint;
}
}