epispot / EpiJS

A toolset for analyzing and creating epidemiological models.
https://epi.js.org
GNU General Public License v3.0
5 stars 2 forks source link

[v1.3.x] [Bug] Variables not properly declared #88

Closed Quantalabs closed 3 years ago

Quantalabs commented 3 years ago

Describe the bug Variables are not properly declared on line 63 of model.js.

https://github.com/epispot/EpiJS/blob/32c102c5a6d82c79b00740673efdceaff6556e76/EpiJS/model.js#L63-L64

Expected behavior When you run a command, perhaps:

model.get_data(20)

It returns an error:

$ node index.js
/home/user/project/node_modules/@epispot/epijs/EpiJS/model.js:63
key = this.key
         ^

ReferenceError: key is not defined

NPM

Additional context Solution can be easily fixed with:

var key = this.key 
var newkey = key