Fix obligatory content on sendFile (#292)

This commit is contained in:
Bruno Moreira
2016-04-23 17:32:15 +01:00
committed by abalabahaha
parent 68a21ee679
commit a5517c2c3b
2 changed files with 5 additions and 9 deletions

View File

@@ -648,7 +648,7 @@ export default class InternalClient {
}
// def sendFile
sendFile(where, _file, name, _content) {
sendFile(where, _file, name, content) {
if (!name) {
if (_file instanceof String || typeof _file === "string") {
name = require("path").basename(_file);
@@ -660,11 +660,9 @@ export default class InternalClient {
}
}
var content = this.resolver.resolveString(_content);
if(content) {
if (content) {
content = {
content
content: this.resolver.resolveString(content)
};
}