From e500cfae757f10b8cd0dcaa2f2524f7457af9997 Mon Sep 17 00:00:00 2001 From: bwhitn Date: Fri, 24 Nov 2017 10:31:26 -0800 Subject: [PATCH] Fixed errors --- src/core/FlowControl.js | 8 +++----- src/core/config/OperationConfig.js | 2 +- test/tests/operations/FlowControl.js | 4 ++-- 3 files changed, 6 insertions(+), 8 deletions(-) diff --git a/src/core/FlowControl.js b/src/core/FlowControl.js index 3cfce77b..ea798d7e 100755 --- a/src/core/FlowControl.js +++ b/src/core/FlowControl.js @@ -173,7 +173,7 @@ const FlowControl = { jmpIndex = FlowControl._getLabelIndex(ings[0], state), maxJumps = ings[1]; - if (state.numJumps >= maxJumps || jmpIndex == -1) { + if (state.numJumps >= maxJumps || jmpIndex === -1) { return state; } @@ -201,7 +201,7 @@ const FlowControl = { jmpIndex = FlowControl._getLabelIndex(ings[2], state), maxJumps = ings[3]; - if (state.numJumps >= maxJumps || jmpIndex == -1) { + if (state.numJumps >= maxJumps || jmpIndex === -1) { return state; } @@ -228,7 +228,7 @@ const FlowControl = { let index = -1; for (let o = 0; o < state.opList.length; o++) { let operation = state.opList[o]; - if (operation.getConfig()["op"] === "Label"){ + if (operation.getConfig().op === "Label"){ let ings = operation.getIngValues(); if (name === ings[0]) { index = o; @@ -240,8 +240,6 @@ const FlowControl = { }, - - /** * Return operation. * diff --git a/src/core/config/OperationConfig.js b/src/core/config/OperationConfig.js index 5a7fd839..e3b871ef 100755 --- a/src/core/config/OperationConfig.js +++ b/src/core/config/OperationConfig.js @@ -184,7 +184,7 @@ const OperationConfig = { }, "Label": { module: "Default", - description: "Provides a place to write comments within the flow of the recipe. This operation has no computational effect.", + description: "Provides a location for for conditional and fixed jumps to jump.", inputType: "string", outputType: "string", flowControl: true, diff --git a/test/tests/operations/FlowControl.js b/test/tests/operations/FlowControl.js index f96a9e4a..04ed93eb 100644 --- a/test/tests/operations/FlowControl.js +++ b/test/tests/operations/FlowControl.js @@ -260,8 +260,8 @@ TestRegister.addTests([ ].join("\n"), recipeConfig: [ { - op: "Label", - args: ["back to the beginning"], + op: "Label", + args: ["back to the beginning"], }, { op: "Jump",