Skip to content

Commit 3dd00bf

Browse files
committed
Merge pull request #270 from nodegit/callback-promises
MSBUILD doesn't allow an array of size 0
2 parents 83ee7e0 + e2777b5 commit 3dd00bf

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

generate/partials/field_accessors.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ void {{ cppClassName }}::{{ field.name }}_asyncPromisePolling(uv_work_t* req, in
173173
{{ field.name|titleCase }}Baton* baton = static_cast<{{ field.name|titleCase }}Baton*>(req->data);
174174
Local<Object> promise = NanNew<Object>(baton->promise);
175175
NanCallback* isPendingFn = new NanCallback(promise->Get(NanNew("isPending")).As<Function>());
176-
Local<Value> argv[0];
176+
Local<Value> argv[1]; // MSBUILD won't assign an array of length 0
177177
Local<Boolean> isPending = isPendingFn->Call(0, argv)->ToBoolean();
178178

179179
if (isPending->Value()) {

0 commit comments

Comments
 (0)