We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 0420353 commit 6d94af5Copy full SHA for 6d94af5
lib/loader.js
@@ -42,8 +42,12 @@ module.exports.loader = function loader(devtoolsRegisterOpts) {
42
43
NestFactory.create = function create(...args) {
44
// create(module, options)
45
+ // create(module, httpAdapter)
46
// create(module, httpAdapter, options)
- const optsIdx = args.length === 3 ? 2 : 1
47
+ let optsIdx = 1;
48
+ if(args.length === 3 || (args.length === 2 && typeof args[1] === "object" && Object.getPrototypeOf(args[1].constructor).name === "AbstractHttpAdapter")){
49
+ optsIdx = 2;
50
+ }
51
52
/** @type {import('@nestjs/common').NestApplicationOptions} */
53
const optsToMerge = {
0 commit comments