Skip to content

Commit

Permalink
Fix default response template
Browse files Browse the repository at this point in the history
  • Loading branch information
patrickheeney committed Sep 4, 2017
1 parent 889b640 commit df2f460
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Endpoint.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,9 @@ class Endpoint {
// determine response template
const resFilename = `${this.options.handlerPath}.res.vm`;
fep.responseContentType = this.getResponseContentType(fep);
debugLog('Response Content-Type ', this.responseContentType);
debugLog('Response Content-Type ', fep.responseContentType);
// load response template from http response template, or load file if exists other use default
if (fep.response.template) {
if (fep.response && fep.response.template) {
fep.responses.default.responseTemplates[fep.responseContentType] = fep.response.template;
}
else if (fs.existsSync(resFilename)) {
Expand Down

0 comments on commit df2f460

Please sign in to comment.