Not passing passThroughHeaders into options of mount results in Error
tw00 opened this issue · 0 comments
tw00 commented
Not passing passThroughHeaders
into mount(..., { passThroughHeaders: [] })
results in the following error:
node_modules/graphql-rest-router/Router.js:70
? [...this.passThroughHeaders, ...options.passThroughHeaders]
^
TypeError: options.passThroughHeaders is not iterable
at Router.mount (/Users/tw/Projects/curator-stack/api/node_modules/graphql-rest-router/Router.js:70:59)
at makeGQLRestRouter (/Users/tw/Projects/curator-stack/api/tests/load-test.js:37:6)
Changing
- const passThroughHeaders = Boolean(options)
+ const passThroughHeaders = Boolean(options) && Boolean(options.passThroughHeaders)
here
Line 95 in 700c1f1
should fix the issue.