File tree Expand file tree Collapse file tree 1 file changed +3
-8
lines changed Expand file tree Collapse file tree 1 file changed +3
-8
lines changed Original file line number Diff line number Diff line change @@ -919,14 +919,9 @@ class Server {
919
919
return next ( ) ;
920
920
}
921
921
// Serve a page that executes the javascript
922
- res . write (
923
- '<!DOCTYPE html><html><head><meta charset="utf-8"/></head><body><script type="text/javascript" charset="utf-8" src="'
924
- ) ;
925
- res . write ( _path ) ;
926
- res . write ( '.js' ) ;
927
- res . write ( req . _parsedUrl . search || '' ) ;
928
-
929
- res . end ( '"></script></body></html>' ) ;
922
+ const queries = req . _parsedUrl . search || '' ;
923
+ const responsePage = `<!DOCTYPE html><html><head><meta charset="utf-8"/></head><body><script type="text/javascript" charset="utf-8" src="${ _path } .js${ queries } "></script></body></html>` ;
924
+ res . send ( responsePage ) ;
930
925
} catch ( err ) {
931
926
return next ( ) ;
932
927
}
You can’t perform that action at this time.
0 commit comments