Skip to content

Commit

Permalink
deps: fix shim for v8::Value::IntegerValue()
Browse files Browse the repository at this point in the history
This was introduced in 48d1335. Previously, values such as
`undefined` would not be coerced properly because `NumberValue()`
returns `NaN` for them.

Refs: nodejs#23158
  • Loading branch information
addaleax committed Oct 26, 2018
1 parent d8924a0 commit a96358f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion deps/v8/src/api.cc
Original file line number Diff line number Diff line change
Expand Up @@ -3901,7 +3901,7 @@ double Value::NumberValue() const {


int64_t Value::IntegerValue() const {
return NumberValue(Isolate::GetCurrent()->GetCurrentContext())
return IntegerValue(Isolate::GetCurrent()->GetCurrentContext())
.FromMaybe(0);
}

Expand Down

0 comments on commit a96358f

Please sign in to comment.