Closed RebeccaStevens closed 1 year ago
Base: 99.60% // Head: 99.60% // Increases project coverage by +0.00%
:tada:
Coverage data is based on head (
64163f4
) compared to base (a47f77d
). Patch coverage: 100.00% of modified lines in pull request are covered.
:umbrella: View full report at Codecov.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.
In #181, I mentioned that we might allow the initial value to be a promise. And in the one-line solution that I gave, it would handle a Promise as the initial value.
In your solution, you do not allow it. Could you, please share your thoughts on why not?
Adding support for a promise as the initial value was a little bit tricker but I've added it now. The one-line solution you gave was close to what was needed but didn't quite work. (The first argument passed to the callback, should be the awaited value, not the promise itself)
I have refactored out an extraneous promise there. I hope you don't mind :smile:
fix #181