Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions src/core/Operation.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down