Skip to content

Commit

Permalink
src: set maximum of vector
Browse files Browse the repository at this point in the history
This addresses the comment in #24613
  • Loading branch information
kt3k committed Nov 27, 2018
1 parent b3a0e1f commit 11230d2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/node_util.cc
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ static void GetPromiseDetails(const FunctionCallbackInfo<Value>& args) {
Local<Promise> promise = args[0].As<Promise>();

int state = promise->State();
std::vector<Local<Value>> values;
std::vector<Local<Value>> values(2);
values.push_back(Integer::New(isolate, state));
if (state != Promise::PromiseState::kPending)
values.push_back(promise->Result());
Expand Down

0 comments on commit 11230d2

Please sign in to comment.