Skip to content

Commit

Permalink
change method used to check inclusion
Browse files Browse the repository at this point in the history
  • Loading branch information
Robert Brignull committed Jun 1, 2020
1 parent 07e22b1 commit 22501fd
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
5 changes: 3 additions & 2 deletions lib/config-utils.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion lib/config-utils.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 3 additions & 2 deletions src/config-utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,9 @@ export class Config {

// Check for one of the builtin suites
if (queryUses.indexOf('/') === -1 && queryUses.indexOf('@') === -1) {
if (builtinSuites.includes(queryUses as any)) {
this.additionalSuites.push(queryUses as BuiltInSuite);
const suite = builtinSuites.find((suite) => suite === queryUses);
if (suite) {
this.additionalSuites.push(suite);
return;
} else {
throw new Error(getQueryUsesIncorrect(queryUses));
Expand Down

0 comments on commit 22501fd

Please sign in to comment.