Skip to content

Fix bug where onCall handler failed to encode returned value that contained a function#1000

Merged
taeold merged 6 commits intomasterfrom
dl-fix-encode
Oct 28, 2021
Merged

Fix bug where onCall handler failed to encode returned value that contained a function#1000
taeold merged 6 commits intomasterfrom
dl-fix-encode

Conversation

@taeold
Copy link
Copy Markdown
Contributor

@taeold taeold commented Oct 28, 2021

In #915, we replaced use of _.isObject(data) with typeof data === 'object'.

Turns out that _.isObject returns true for functions (code). We update the condition to match the previous behavior.

Fixes #964

@google-cla google-cla bot added the cla: yes label Oct 28, 2021
@taeold taeold requested review from colerogers and inlined October 28, 2021 00:26
@taeold taeold marked this pull request as ready for review October 28, 2021 00:27
@taeold taeold merged commit 87472f3 into master Oct 28, 2021
@taeold taeold deleted the dl-fix-encode branch October 28, 2021 06:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Data cannot be encoded in JSON: path => firestore.doc(path)

2 participants