Skip to content

Commit

Permalink
fix(tserver): update error message, and remove bad conditional check …
Browse files Browse the repository at this point in the history
…in initRouters
  • Loading branch information
IG\tvalcke committed Aug 5, 2019
1 parent 2420565 commit 734127c
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions sources/TServer.js
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ class TServer {

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

console.error( `The configuration middleware "${name}" seems to encounter internal error !` )
console.error( `The middleware "${name}" seems to encounter internal error !` )
console.error( error )

} else {
Expand All @@ -151,10 +151,6 @@ class TServer {

_initRouters ( routers ) {

if ( isNotArray( routers ) ) {
throw new TypeError( `Invalid routers, expect an array of argument to spread to middleware module, got ${routers.constructor.name}` )
}

for ( let routerName in routers ) {

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

0 comments on commit 734127c

Please sign in to comment.