Skip to content

Commit

Permalink
fix(moduleExec): pass correct object to validation (#27)
Browse files Browse the repository at this point in the history
* fix(moduleExec): pass correct object to validation
* fix: simplify overrides validation
  • Loading branch information
pudgereyem committed Feb 9, 2021
1 parent 8017659 commit 8b0f9c7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/lib/moduleExec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ export default async function moduleExec(this: ThisWithFetch, opts: ModuleExecOp
validateAndCoerceTypes({
source: moduleName,
type: 'options',
object: queryOpts.overrides,
object: queryOpts.overrides ?? {},
schemaKey: queryOpts.schemaKey,
options: this._opts ? this._opts.validation : _opts.validation
});
Expand Down
2 changes: 1 addition & 1 deletion src/modules/quote.ts
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ export default function quote(
schemaKey: "#/definitions/QuoteOptions",
defaults: queryOptionsDefaults,
runtime: { symbols },
overrides: queryOptionsOverrides || {},
overrides: queryOptionsOverrides,
},

result: {
Expand Down

0 comments on commit 8b0f9c7

Please sign in to comment.