summaryrefslogtreecommitdiff
path: root/js/IntegerOp
diff options
context:
space:
mode:
authorSunil Shetye2018-07-18 16:28:24 +0530
committerSunil Shetye2018-07-18 17:07:40 +0530
commit975ae6706b4ac868425193cf25bcbbb268051b5d (patch)
treea08dfa09d5fa0ce9892b3aba84f7420cebc4f532 /js/IntegerOp
parent4d1e8bb193a7315a8fcfe1e09c33befdee660b7d (diff)
downloadsci2js-975ae6706b4ac868425193cf25bcbbb268051b5d.tar.gz
sci2js-975ae6706b4ac868425193cf25bcbbb268051b5d.tar.bz2
sci2js-975ae6706b4ac868425193cf25bcbbb268051b5d.zip
handle empty array in comparison
Diffstat (limited to 'js/IntegerOp')
-rw-r--r--js/IntegerOp/LOGIC.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/js/IntegerOp/LOGIC.js b/js/IntegerOp/LOGIC.js
index fe5a24fd..cba94d18 100644
--- a/js/IntegerOp/LOGIC.js
+++ b/js/IntegerOp/LOGIC.js
@@ -45,7 +45,7 @@ function LOGIC() {
if ((u1!=nin)) {
block_parameter_error(msprintf("Wrong size for \'%s\' parameter: %d.","Truth Table",size(this.mat,1)),"Number of rows must be a power of two.");
var ok = false;
- } else if ((find(this.mat.slice()!=0&&this.mat.slice()!=1)!=[])) {
+ } else if ((find(this.mat.slice()!=0&&this.mat.slice()!=1).length!=0)) {
block_parameter_error(msprintf("Wrong value for \'%s\' parameter.","Truth Table"),msprintf("Elements must be in the interval %s.","[0, 1]"));
var ok = false;
} else if (this.herit<0||this.herit>1) {