From e862efc40dcc80eba4394e25f20f5ca7353d2b15 Mon Sep 17 00:00:00 2001 From: anika-ahluwalia Date: Sun, 17 May 2020 17:11:11 -0500 Subject: adjusting params --- src/client/views/nodes/ScriptingBox.tsx | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) (limited to 'src/client/views/nodes/ScriptingBox.tsx') diff --git a/src/client/views/nodes/ScriptingBox.tsx b/src/client/views/nodes/ScriptingBox.tsx index 7ffb0802a..eaf8f0e5b 100644 --- a/src/client/views/nodes/ScriptingBox.tsx +++ b/src/client/views/nodes/ScriptingBox.tsx @@ -168,11 +168,18 @@ export class ScriptingBox extends ViewBoxAnnotatableComponent ""} SetValue={value => { if (value !== "" && value !== " ") { - this._paramNum++; - const par = this.compileParams; - this.compileParams = new List(value.split(";").filter(s => s !== " ")); - this.compileParams.push.apply(this.compileParams, par); - return true; + const parameter = value.split(":"); + if (parameter[1] !== undefined) { + this._errorMessage = ""; + this._paramNum++; + const par = this.compileParams; + this.compileParams = new List(value.split(";").filter(s => s !== " ")); + this.compileParams.push.apply(this.compileParams, par); + return true; + } else { + //this._errorMessage = "must set type of parameter"; + return false; + } } return false; }} -- cgit v1.2.3-70-g09d2