From f6da5f5f08e14bf4838ce7b6740b89148af1b20e Mon Sep 17 00:00:00 2001 From: Gabriel Schulhof Date: Sun, 11 Dec 2016 23:50:30 +0200 Subject: [PATCH] Fix implementation of napi_create_boolean --- src/node_jsrtapi.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/node_jsrtapi.cc b/src/node_jsrtapi.cc index 1eeefc94dd..445d464a2f 100644 --- a/src/node_jsrtapi.cc +++ b/src/node_jsrtapi.cc @@ -501,7 +501,7 @@ napi_value napi_create_number(napi_env e, double v) { napi_value napi_create_boolean(napi_env e, bool b) { JsErrorCode error = JsNoError; JsValueRef booleanValue = nullptr; - error = JsDoubleToNumber(b, &booleanValue); + error = JsBoolToBoolean(b, &booleanValue); return reinterpret_cast(booleanValue); }