[node] Fix handling of response callback with no arguments; add test

This commit is contained in:
John Firebaugh
2016-02-19 17:09:09 -08:00
parent f7f89cb44a
commit 675a628aa2
2 changed files with 30 additions and 1 deletions

View File

@@ -48,7 +48,7 @@ NAN_METHOD(NodeRequest::Respond) {
mbgl::Response response;
if (info.Length() < 1) {
response.error = std::make_unique<Error>(Error::Reason::NotFound);
response.noContent = true;
} else if (info[0]->BooleanValue()) {
std::unique_ptr<Nan::Utf8String> message;