Skip to content

Commit b819b9a

Browse files
bbourejamesfer
authored andcommitted
fix(Transformer): handle undefined values better
The transformer was incorrectly handling undefined values. While Neo4j does not have the concept of undefined values (instead only using null), the Neo4j driver does sometimes represent an object with a property that is undefined such as the [Point](https://github.com/neo4j/neo4j-javascript-driver/blob/4.0/types/spatial-types.d.ts#L27) object.
1 parent b330f0d commit b819b9a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/transformer.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ export class Transformer {
6464

6565
private isPlainValue(value: any): value is PlainValue {
6666
const type = typeof value;
67-
return value === null || type === 'string' || type === 'boolean' || type === 'number';
67+
return value == null || type === 'string' || type === 'boolean' || type === 'number';
6868
}
6969

7070
private isNode(node: any): node is NeoNode {

0 commit comments

Comments
 (0)