Skip to content

Commit 734127c

Browse files
author
IG\tvalcke
committed
fix(tserver): update error message, and remove bad conditional check in initRouters
1 parent 2420565 commit 734127c

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

sources/TServer.js

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ class TServer {
135135

136136
if ( error instanceof TypeError && error.message === 'Found non-callable @@iterator' ) {
137137

138-
console.error( `The configuration middleware "${name}" seems to encounter internal error !` )
138+
console.error( `The middleware "${name}" seems to encounter internal error !` )
139139
console.error( error )
140140

141141
} else {
@@ -151,10 +151,6 @@ class TServer {
151151

152152
_initRouters ( routers ) {
153153

154-
if ( isNotArray( routers ) ) {
155-
throw new TypeError( `Invalid routers, expect an array of argument to spread to middleware module, got ${routers.constructor.name}` )
156-
}
157-
158154
for ( let routerName in routers ) {
159155

160156
if ( !Object.prototype.hasOwnProperty.call( routers, routerName ) ) { continue }

0 commit comments

Comments
 (0)