Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[fix]: allow async functions in transactions #576

Merged
merged 1 commit into from
Mar 10, 2019

Conversation

schmidt-sebastian
Copy link
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

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

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 join this conversation on GitHub. Already have an account? Sign in to comment
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