Skip to content

Commit 262ccec

Browse files
authored
combine null and undefined
1 parent a845bce commit 262ccec

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

src/node_sqlite.cc

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2284,7 +2284,7 @@ bool StatementSync::BindValue(const Local<Value>& value, const int index) {
22842284
SQLITE_TRANSIENT,
22852285
SQLITE_UTF8);
22862286
}
2287-
} else if (value->IsNull()) {
2287+
} else if (value->IsNull() || value->IsUndefined()) {
22882288
r = sqlite3_bind_null(statement_, index);
22892289
} else if (value->IsArrayBufferView()) {
22902290
ArrayBufferViewContents<uint8_t> buf(value);
@@ -2293,8 +2293,6 @@ bool StatementSync::BindValue(const Local<Value>& value, const int index) {
22932293
buf.data(),
22942294
static_cast<sqlite3_uint64>(buf.length()),
22952295
SQLITE_TRANSIENT);
2296-
} else if (value->IsUndefined()) {
2297-
r = sqlite3_bind_null(statement_, index);
22982296
} else if (value->IsBigInt()) {
22992297
bool lossless;
23002298
int64_t as_int = value.As<BigInt>()->Int64Value(&lossless);

0 commit comments

Comments
 (0)