Skip to content
This repository was archived by the owner on Dec 15, 2022. It is now read-only.

Commit 353a33c

Browse files
committed
Compile this file, maybe?
1 parent ac81ba4 commit 353a33c

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/main.cc

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ class Spellchecker : public Nan::ObjectWrap {
7878
Local<Array> result = Nan::New<Array>(dictionaries.size());
7979
for (size_t i = 0; i < dictionaries.size(); ++i) {
8080
const std::string& dict = dictionaries[i];
81-
result->Set(i, Nan::New(dict.data(), dict.size()));
81+
result->Set(i, Nan::New(dict.data(), dict.size()).ToLocalChecked());
8282
}
8383

8484
info.GetReturnValue().Set(result);
@@ -99,7 +99,9 @@ class Spellchecker : public Nan::ObjectWrap {
9999
Local<Array> result = Nan::New<Array>(corrections.size());
100100
for (size_t i = 0; i < corrections.size(); ++i) {
101101
const std::string& word = corrections[i];
102-
result->Set(i, Nan::New<String>(word.data(), word.size())).ToLocalChecked();
102+
103+
Nan::MaybeLocal<String> val = Nan::New<String>(word.data(), word.size());
104+
result->Set(i, val.ToLocalChecked());
103105
}
104106

105107
info.GetReturnValue().Set(result);

0 commit comments

Comments
 (0)