File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -73,18 +73,21 @@ export function runHandler(
73
73
74
74
public send ( sendBody : any ) {
75
75
if ( this . writeCalled ) {
76
- throw Error ( "Cannot set headers after they are sent to the client" )
76
+ throw Error ( "Cannot set headers after they are sent to the client" ) ;
77
77
}
78
78
79
79
const toSend = typeof sendBody === "object" ? JSON . stringify ( sendBody ) : sendBody ;
80
- const body = typeof this . sentBody === 'undefined' ? toSend : this . sentBody + ( ( toSend as string ) || "" ) ;
80
+ const body =
81
+ typeof this . sentBody === "undefined"
82
+ ? toSend
83
+ : this . sentBody + ( ( toSend as string ) || "" ) ;
81
84
this . end ( body ) ;
82
85
}
83
86
84
87
public write ( writeBody : any , cb ?: ( ) => void ) {
85
88
this . writeCalled = true ;
86
89
87
- if ( typeof this . sentBody === ' undefined' ) {
90
+ if ( typeof this . sentBody === " undefined" ) {
88
91
this . sentBody = writeBody ;
89
92
} else {
90
93
this . sentBody += typeof writeBody === "object" ? JSON . stringify ( writeBody ) : writeBody ;
You can’t perform that action at this time.
0 commit comments