Skip to content

Commit

Permalink
Per comment
Browse files Browse the repository at this point in the history
  • Loading branch information
sinklair committed Aug 20, 2019
1 parent db7f3c0 commit fbd0d37
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,6 @@ module.exports = function mjml(mjmlEngine, options) {

const raise = error(localOptions.filePath);

if (localOptions.fileExt === undefined) {
localOptions.fileExt = ".html";
}

if (file.isStream()) {
this.emit("error", raise("Streams are not supported!"));
return callback();
Expand All @@ -51,7 +47,7 @@ module.exports = function mjml(mjmlEngine, options) {

// [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues
output.contents = Buffer.from(render.html);
output.path = replaceExt(file.path.toString(), localOptions.fileExt);
output.path = replaceExt(file.path.toString(), localOptions.fileExt || ".html");
this.push(output);
}
return callback();
Expand Down

0 comments on commit fbd0d37

Please sign in to comment.