diff --git a/src/README.md b/src/README.md index 774614395afd40..8162deecb3cc83 100644 --- a/src/README.md +++ b/src/README.md @@ -619,7 +619,7 @@ v8::Maybe SumNumbers(v8::Local context, for (uint32_t i = 0; i < array_of_integers->Length(); i++) { v8::Local entry; - if (array_of_integers->Get(context, i).ToLocal(&entry)) { + if (!array_of_integers->Get(context, i).ToLocal(&entry)) { // Oops, we might have hit a getter that throws an exception! // It's better to not continue return an empty (“nothing”) Maybe. return v8::Nothing();