Skip to content
This repository was archived by the owner on Mar 4, 2026. It is now read-only.

[fix]: allow async functions in transactions#576

Merged
schmidt-sebastian merged 1 commit intomasterfrom
mrschmidt-asyncfuntion
Mar 10, 2019
Merged

[fix]: allow async functions in transactions#576
schmidt-sebastian merged 1 commit intomasterfrom
mrschmidt-asyncfuntion

Conversation

@schmidt-sebastian
Copy link
Copy Markdown
Contributor

Fixes #574.

The toString() call on an async function produces [object AsyncFunction] instead of [object Function]. This PR replaces the toString() check with the same typeof check we use in the Web SDK, which returns "function" for both. See lodash/lodash#2768 for other examples of the same issue.

Note: The lack of tests in this PR is due to the fact that we still support Node 6 and don't use async/await in the transpiled code. It is therefore impossible to write an async Function that would trigger this failure.

@googlebot googlebot added the cla: yes This human has signed the Contributor License Agreement. label Mar 10, 2019
@schmidt-sebastian schmidt-sebastian changed the title Allow async functions [fix]: allow async functions in transactions Mar 10, 2019
@codecov
Copy link
Copy Markdown

codecov Bot commented Mar 10, 2019

Codecov Report

Merging #576 into master will not change coverage.
The diff coverage is 100%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #576   +/-   ##
=======================================
  Coverage   96.01%   96.01%           
=======================================
  Files          24       24           
  Lines        1955     1955           
  Branches      169      168    -1     
=======================================
  Hits         1877     1877           
  Misses         57       57           
  Partials       21       21
Impacted Files Coverage Δ
dev/src/util.ts 100% <100%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 0dcea7f...ebdd316. Read the comment docs.

1 similar comment
@codecov
Copy link
Copy Markdown

codecov Bot commented Mar 10, 2019

Codecov Report

Merging #576 into master will not change coverage.
The diff coverage is 100%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #576   +/-   ##
=======================================
  Coverage   96.01%   96.01%           
=======================================
  Files          24       24           
  Lines        1955     1955           
  Branches      169      168    -1     
=======================================
  Hits         1877     1877           
  Misses         57       57           
  Partials       21       21
Impacted Files Coverage Δ
dev/src/util.ts 100% <100%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 0dcea7f...ebdd316. Read the comment docs.

@schmidt-sebastian schmidt-sebastian merged commit aac490f into master Mar 10, 2019
@schmidt-sebastian schmidt-sebastian deleted the mrschmidt-asyncfuntion branch March 11, 2019 03:08
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

cla: yes This human has signed the Contributor License Agreement.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants