mirror of
https://github.com/nodejs/node.git
synced 2026-11-25 23:01:06 -05:00
deps: fix shim for v8::Value::IntegerValue()
This was introduced in 48d1335bbc. Previously, values such as
`undefined` would not be coerced properly because `NumberValue()`
returns `NaN` for them.
Refs: https://github.com/nodejs/node/pull/23158
PR-URL: https://github.com/nodejs/node/pull/23898
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Ujjwal Sharma <usharma1998@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
This commit is contained in:
1 parent
fef17b716d
commit
0312d8b2cd
1 file changed
+1
-1
Vendored
+1
-1
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user