Skip to content
This repository was archived by the owner on Jan 31, 2023. It is now read-only.

Commit 77e798a

Browse files
committed
make code simpler to avoid wrapping in parens
1 parent 340c114 commit 77e798a

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

index.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -159,10 +159,11 @@ const preprocessor = (options = {}) => {
159159
log(`update ${filePath}`)
160160
// we overwrite the cached bundle promise, so on subsequent invocations
161161
// it gets the latest bundle
162-
const bundlePromise = (bundles[filePath] = bundle().finally(() => {
162+
const bundlePromise = bundle().finally(() => {
163163
log(`- update finished for ${filePath}`)
164164
file.emit('rerun')
165-
}))
165+
})
166+
bundles[filePath] = bundlePromise
166167
// we suppress unhandled rejections so they don't bubble up to the
167168
// unhandledRejection handler and crash the app. Cypress will eventually
168169
// take care of the rejection when the file is requested

0 commit comments

Comments
 (0)