Skip to content

Commit 2fd43da

Browse files
committed
Added return to renderAsset calls
1 parent baac3b6 commit 2fd43da

2 files changed

Lines changed: 5 additions & 5 deletions

File tree

index.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -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 {

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "small-router",
3-
"version": "1.1.13",
3+
"version": "1.1.15",
44
"description": "Small router module that creates http server and runs callbacks that have have been added for a route via the api",
55
"main": "index.js",
66
"scripts": {

0 commit comments

Comments
 (0)