[GH-ISSUE #47] incorrect checks for an object-like value #121

Open
opened 2026-03-15 11:33:50 +03:00 by kerem · 1 comment
Owner

Originally created by @thealjey on GitHub (Sep 4, 2020).
Original GitHub issue: https://github.com/atulmy/gql-query-builder/issues/47

throughout the code there are checks like;

const value = typeof variable === "object" ? variable.value : variable;

however, typeof will also result in "object" if value is null
in which case the above code will simply fail

I'm considering making a PR in a few days to address this issue

Originally created by @thealjey on GitHub (Sep 4, 2020). Original GitHub issue: https://github.com/atulmy/gql-query-builder/issues/47 throughout the code there are checks like; ```ts const value = typeof variable === "object" ? variable.value : variable; ``` however, `typeof` will also result in `"object"` if `value` is `null` in which case the above code will simply fail I'm considering making a PR in a few days to address this issue
Author
Owner

@atulmy commented on GitHub (Sep 5, 2020):

@thealjey thanks for identifying the issue. Looking forward to the PR.

<!-- gh-comment-id:687567552 --> @atulmy commented on GitHub (Sep 5, 2020): @thealjey thanks for identifying the issue. Looking forward to the PR.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/gql-query-builder#121
No description provided.