Skip to content

Commit cae4d97

Browse files
committed
Fix a bun issue with stack traces
1 parent 5f569d8 commit cae4d97

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

src/query.js

+5-6
Original file line numberDiff line numberDiff line change
@@ -37,13 +37,12 @@ export class Query extends Promise {
3737
}
3838

3939
get origin() {
40-
return this.handler.debug
40+
return (this.handler.debug
4141
? this[originError].stack
42-
: this.tagged
43-
? originStackCache.has(this.strings)
44-
? originStackCache.get(this.strings)
45-
: originStackCache.set(this.strings, this[originError].stack).get(this.strings)
46-
: ''
42+
: this.tagged && originStackCache.has(this.strings)
43+
? originStackCache.get(this.strings)
44+
: originStackCache.set(this.strings, this[originError].stack).get(this.strings)
45+
) || ''
4746
}
4847

4948
static get [Symbol.species]() {

0 commit comments

Comments
 (0)