Skip to content

Commit 34d5b43

Browse files
committed
chore: minor imprs
1 parent c94aabd commit 34d5b43

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/core.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,7 @@ export class ProcessPromise extends Promise<ProcessOutput> {
235235
executor?.(...args)
236236
})
237237

238-
if (executor === noop) {
238+
if (bound.length) {
239239
const [sync, cmd, from, snapshot] = bound.pop()!
240240
this._command = cmd
241241
this._from = from

test/core.test.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -456,7 +456,7 @@ describe('core', () => {
456456

457457
it('all transitions', async () => {
458458
const { promise, resolve, reject } = Promise.withResolvers()
459-
const p = new ProcessPromise(() => {})
459+
const p = new ProcessPromise(noop)
460460
ProcessPromise.disarm(p, false)
461461
assert.equal(p.stage, 'initial')
462462

0 commit comments

Comments
 (0)