Skip to content
Snippets Groups Projects
Commit 4d7e35ed authored by francois.grand's avatar francois.grand
Browse files

ParamValueIterator : correction de bugs

parent 7ec2382d
No related branches found
No related tags found
No related merge requests found
......@@ -78,7 +78,7 @@ export class ParamValueIterator implements IterableIterator<number> {
break;
default:
throw new Error(`mode de génération de valeurs ${ParamValueMode[this._param.valueMode]}`);
throw new Error(`ParamValueIterator : mode de génération de valeurs ${ParamValueMode[this._param.valueMode]} incorrect`);
}
}
......@@ -95,8 +95,7 @@ export class ParamValueIterator implements IterableIterator<number> {
// liste
case 2:
const i = this._index;
return this._index >= this._param.valueList.length;
return this._index < this._param.valueList.length;
default:
throw new Error(`ParamValueIterator.hasNext() : erreur interne`);
......@@ -107,11 +106,13 @@ export class ParamValueIterator implements IterableIterator<number> {
switch (this._config) {
// valeur fixée
case 0:
if (this.hasNext)
if (this.hasNext) {
this._index++;
return {
done: false,
value: this._param.singleValue
};
}
else
return {
done: true,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment