@@ -271,7 +271,7 @@ inline bool Value::IsEmpty() const {
271
271
}
272
272
273
273
inline napi_valuetype Value::Type () const {
274
- if (_value == nullptr ) {
274
+ if (IsEmpty () ) {
275
275
return napi_undefined;
276
276
}
277
277
@@ -314,7 +314,7 @@ inline bool Value::IsSymbol() const {
314
314
}
315
315
316
316
inline bool Value::IsArray () const {
317
- if (_value == nullptr ) {
317
+ if (IsEmpty () ) {
318
318
return false ;
319
319
}
320
320
@@ -325,7 +325,7 @@ inline bool Value::IsArray() const {
325
325
}
326
326
327
327
inline bool Value::IsArrayBuffer () const {
328
- if (_value == nullptr ) {
328
+ if (IsEmpty () ) {
329
329
return false ;
330
330
}
331
331
@@ -336,7 +336,7 @@ inline bool Value::IsArrayBuffer() const {
336
336
}
337
337
338
338
inline bool Value::IsTypedArray () const {
339
- if (_value == nullptr ) {
339
+ if (IsEmpty () ) {
340
340
return false ;
341
341
}
342
342
@@ -355,7 +355,7 @@ inline bool Value::IsFunction() const {
355
355
}
356
356
357
357
inline bool Value::IsPromise () const {
358
- if (_value == nullptr ) {
358
+ if (IsEmpty () ) {
359
359
return false ;
360
360
}
361
361
@@ -366,7 +366,7 @@ inline bool Value::IsPromise() const {
366
366
}
367
367
368
368
inline bool Value::IsDataView () const {
369
- if (_value == nullptr ) {
369
+ if (IsEmpty () ) {
370
370
return false ;
371
371
}
372
372
@@ -377,7 +377,7 @@ inline bool Value::IsDataView() const {
377
377
}
378
378
379
379
inline bool Value::IsBuffer () const {
380
- if (_value == nullptr ) {
380
+ if (IsEmpty () ) {
381
381
return false ;
382
382
}
383
383
0 commit comments