From 975ae6706b4ac868425193cf25bcbbb268051b5d Mon Sep 17 00:00:00 2001 From: Sunil Shetye Date: Wed, 18 Jul 2018 16:28:24 +0530 Subject: handle empty array in comparison --- js/Sources/RFILE_f.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'js/Sources/RFILE_f.js') diff --git a/js/Sources/RFILE_f.js b/js/Sources/RFILE_f.js index 8c3ce1b7..d0e2060a 100644 --- a/js/Sources/RFILE_f.js +++ b/js/Sources/RFILE_f.js @@ -67,7 +67,7 @@ function RFILE_f() { var nout = size(this.outmask,"*"); if (prod(size(this.tmask1))>1) { block_parameter_error(msprintf("Wrong value for \'%s\' parameter: %s.","Time Record Selection",strcat(string(this.tmask1.slice())," ")),"Empty matrix or scalar expected."); - } else if (this.tmask1!=[]&&this.tmask1<1) { + } else if (this.tmask1.length!=0&&this.tmask1<1) { block_parameter_error(msprintf("Wrong value for \'%s\' parameter: %d","Time Record Selection",this.tmask1),"Strictly positive integer expected."); } else if (lunit>0&&min(length(frmt),1)!=min(length(this.frmt1),1)) { block_parameter_error(["Simulation running !!! You cannot switch
between formatted and unformatted"],"End current simulation first."); @@ -86,7 +86,7 @@ function RFILE_f() { } else if (min(this.outmask)<1) { block_parameter_error(msprintf("Wrong value for \'%s\' parameter: %s","Outputs Record Selection",strcat(string(this.outmask.slice())," ")),"Strictly positive indexes expected."); } else { - if (this.tmask1==[]) { + if (this.tmask1.length==0) { var ievt = 0; var cout = []; this.tmask1 = 0; -- cgit