Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions src/pure.js
Original file line number Diff line number Diff line change
Expand Up @@ -109,10 +109,9 @@ const cleanup = () => {
Array.from(containerCache.keys()).forEach(cleanupAtContainer)
}

const act = (fn) => {
const value = fn && fn()
if (value !== undefined && typeof value.then === 'function') {
return value.then(() => tick())
const act = async (fn) => {
if (fn) {
await fn()
}
return tick()
}
Expand Down