Merge a5ebce7f2e24e7bfec45066f7e11fb60f16ab9af into 396c6c8e93928e1f6b4f498c0affae2c55fb6110
This commit is contained in:
commit
cbdcb56318
@ -242,6 +242,10 @@ class Operation {
|
||||
* @param {Object[]} ingValues
|
||||
*/
|
||||
set ingValues(ingValues) {
|
||||
if (ingValues.length > this._ingList.length) {
|
||||
throw new OperationError(`Failed to set ingredient values: more values provided than available ingredients (${ingValues.length} vs ${this._ingList.length})`);
|
||||
}
|
||||
|
||||
ingValues.forEach((val, i) => {
|
||||
try {
|
||||
this._ingList[i].value = val;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user