Skip to content

Commit

Permalink
fixup! fixup! fixup! src: migrate String::Value to String::ValueView
Browse files Browse the repository at this point in the history
  • Loading branch information
avivkeller committed Oct 19, 2024
1 parent f2ed23b commit 15937ab
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/node_buffer.cc
Original file line number Diff line number Diff line change
Expand Up @@ -967,7 +967,7 @@ void IndexOfString(const FunctionCallbackInfo<Value>& args) {
if (enc == UCS2) {
TwoByteValue needle_buffer(isolate, needle);

if (haystack_length < 2 || needle_buffer.length()) {
if (haystack_length < 2 || needle_buffer.length() < 1) {
return args.GetReturnValue().Set(-1);
}

Expand Down

0 comments on commit 15937ab

Please sign in to comment.