@@ -102,21 +102,21 @@ module.exports = (http) => {
102102
103103 if ( this . assetPaths [ assetType ] && this . assetPaths [ assetType ] . hasOwnProperty ( 'path' ) ) {
104104 const { path, stripFromPath } = this . assetPaths [ assetType ] ;
105- this . renderAsset ( path , file , assetType , res , stripFromPath ) ;
105+ return this . renderAsset ( path , file , assetType , res , stripFromPath ) ;
106106 }
107107 }
108108 else if ( assetPaths . indexOf ( fileType ) !== - 1 && this . assetPaths [ fileType ] . hasOwnProperty ( 'path' ) ) {
109109 const { path, stripFromPath } = this . assetPaths [ fileType ] ;
110- this . renderAsset ( path , file , fileType , res , stripFromPath ) ;
110+ return this . renderAsset ( path , file , fileType , res , stripFromPath ) ;
111111 }
112112 else {
113113 if ( this . assetPaths . hasOwnProperty ( fileType ) && this . assetPaths [ fileType ] . hasOwnProperty ( 'path' ) ) {
114114 const { path : filePath } = this . assetPaths [ file ] ;
115115 file = filePath . replace ( `${ assetType } /` , '' ) ;
116- this . renderAsset ( assetType , file , assetType , res ) ;
116+ return this . renderAsset ( assetType , file , assetType , res ) ;
117117 }
118118 }
119-
119+
120120 this . pageNotFound ( res , rawUrl ) ;
121121 }
122122 else {
0 commit comments