Skip to content

Commit

Permalink
Fix systems limits
Browse files Browse the repository at this point in the history
  • Loading branch information
ehmicky committed Aug 25, 2019
1 parent 8dc2d80 commit 249b642
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/limit/validate.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,13 @@ const validateLimitId = function(iterations, id) {

if (!isValidId) {
throw new TypeError(
`Invalid limit '${id}': no such tasks, variations nor commands`,
`Invalid limit '${id}': no such tasks, variations, commands nor systems`,
)
}
}

const hasId = function({ taskId, variationId, commandId }, id) {
return taskId === id || variationId === id || commandId === id
const hasId = function({ taskId, variationId, commandId, systemId }, id) {
return (
taskId === id || variationId === id || commandId === id || systemId === id
)
}

0 comments on commit 249b642

Please sign in to comment.