We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 0c25aa1 commit b0b418bCopy full SHA for b0b418b
src/v1/internal/util.js
@@ -39,7 +39,7 @@ function isEmptyObjectOrNull(obj) {
39
}
40
41
function isObject(obj) {
42
- return typeof obj === 'object' && !Array.isArray(obj) && Boolean(obj);
+ return typeof obj === 'object' && !Array.isArray(obj) && obj !== null;
43
44
45
/**
@@ -79,7 +79,7 @@ function assertCypherStatement(obj) {
79
80
81
function assertQueryParameters(obj) {
82
- if (!isObject(obj) && Boolean(obj)) {
+ if (!isObject(obj)) {
83
// objects created with `Object.create(null)` do not have a constructor property
84
const constructor = obj.constructor ? ' ' + obj.constructor.name : '';
85
throw new TypeError(`Query parameters are expected to either be undefined/null or an object, given:${constructor} ${obj}`);
0 commit comments