Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions napi-inl.h
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,7 @@ inline bool Value::IsEmpty() const {
}

inline napi_valuetype Value::Type() const {
if (_value == nullptr) {
if (IsEmpty()) {
return napi_undefined;
}

Expand Down Expand Up @@ -314,7 +314,7 @@ inline bool Value::IsSymbol() const {
}

inline bool Value::IsArray() const {
if (_value == nullptr) {
if (IsEmpty()) {
return false;
}

Expand All @@ -325,7 +325,7 @@ inline bool Value::IsArray() const {
}

inline bool Value::IsArrayBuffer() const {
if (_value == nullptr) {
if (IsEmpty()) {
return false;
}

Expand All @@ -336,7 +336,7 @@ inline bool Value::IsArrayBuffer() const {
}

inline bool Value::IsTypedArray() const {
if (_value == nullptr) {
if (IsEmpty()) {
return false;
}

Expand All @@ -355,7 +355,7 @@ inline bool Value::IsFunction() const {
}

inline bool Value::IsPromise() const {
if (_value == nullptr) {
if (IsEmpty()) {
return false;
}

Expand All @@ -366,7 +366,7 @@ inline bool Value::IsPromise() const {
}

inline bool Value::IsDataView() const {
if (_value == nullptr) {
if (IsEmpty()) {
return false;
}

Expand All @@ -377,7 +377,7 @@ inline bool Value::IsDataView() const {
}

inline bool Value::IsBuffer() const {
if (_value == nullptr) {
if (IsEmpty()) {
return false;
}

Expand Down