diff options
-rw-r--r-- | src/client/views/nodes/ScriptingBox.tsx | 17 |
1 files changed, 12 insertions, 5 deletions
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<FieldViewProps, Sc GetValue={() => ""} SetValue={value => { if (value !== "" && value !== " ") { - this._paramNum++; - const par = this.compileParams; - this.compileParams = new List<string>(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<string>(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; }} |