Skip to content

Commit

Permalink
fix: Filtering all events shouldnt require an action or a target #61
Browse files Browse the repository at this point in the history
  • Loading branch information
jdalrymple committed Nov 26, 2018
1 parent 2aedfb5 commit cda23b8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/services/Events.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,11 @@ function assertEventOptions(
action: keyof typeof ACTION_TYPES,
target: keyof typeof TARGET_TYPES,
) {
if (!action || !(action in ACTION_TYPES)) {
if (action || !(action in ACTION_TYPES)) {
throw new Error(`This action is not supported. Pleased use one of following options: ${Object.keys(ACTION_TYPES)}`);
}

if (!target || !(target in TARGET_TYPES)) {
if (target || !(target in TARGET_TYPES)) {
throw new Error(`This target is not supported. Pleased use one of following options: ${Object.keys(TARGET_TYPES)}`);
}
}
Expand Down

0 comments on commit cda23b8

Please sign in to comment.