Skip to content

Commit

Permalink
improvement: server only LSP bugfix for config extensions (graphql#1637)
Browse files Browse the repository at this point in the history
  • Loading branch information
acao authored Aug 10, 2020
1 parent d989456 commit 7dfaef7
Showing 1 changed file with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -194,9 +194,11 @@ export class GraphQLLanguageService {

// Check if there are custom validation rules to be used
let customRules: ValidationRule[] | null = null;
const customValidationRules = extensions.customValidationRules;
if (customValidationRules) {
customRules = customValidationRules(this._graphQLConfig);
if (
extensions?.customValidationRules &&
typeof extensions.customValidationRules === 'function'
) {
customRules = extensions.customValidationRules(this._graphQLConfig);

/* eslint-enable no-implicit-coercion */
}
Expand Down

0 comments on commit 7dfaef7

Please sign in to comment.