accept text representing numbers as inputs to NUMBERS prim

pull/89/head
jmoenig 2019-04-27 10:01:40 +02:00
rodzic e19e1dbcb4
commit 380474945f
1 zmienionych plików z 4 dodań i 4 usunięć

Wyświetl plik

@ -1811,19 +1811,19 @@ Process.prototype.reportNumbers = function (start, end) {
// without blocking the UI // without blocking the UI
var dta; var dta;
this.assertType(start, 'number'); this.assertType(+start, 'number');
this.assertType(end, 'number'); this.assertType(+end, 'number');
if (this.context.accumulator === null) { if (this.context.accumulator === null) {
this.context.accumulator = { this.context.accumulator = {
target : new List(), target : new List(),
end : null, end : null,
idx : start idx : +start
}; };
this.context.accumulator.target.isLinked = true; this.context.accumulator.target.isLinked = true;
this.context.accumulator.end = this.context.accumulator.target; this.context.accumulator.end = this.context.accumulator.target;
} }
dta = this.context.accumulator; dta = this.context.accumulator;
if (dta.idx > end) { if (dta.idx > +end) {
dta.end.rest = new List(); dta.end.rest = new List();
this.returnValueToParentContext(dta.target.cdr()); this.returnValueToParentContext(dta.target.cdr());
return; return;