Skip to content

Commit

Permalink
Fix a bun issue with stack traces
Browse files Browse the repository at this point in the history
  • Loading branch information
porsager committed Oct 10, 2023
1 parent 5f569d8 commit cae4d97
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions src/query.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,12 @@ export class Query extends Promise {
}

get origin() {
return this.handler.debug
return (this.handler.debug
? this[originError].stack
: this.tagged
? originStackCache.has(this.strings)
? originStackCache.get(this.strings)
: originStackCache.set(this.strings, this[originError].stack).get(this.strings)
: ''
: this.tagged && originStackCache.has(this.strings)
? originStackCache.get(this.strings)
: originStackCache.set(this.strings, this[originError].stack).get(this.strings)
) || ''
}

static get [Symbol.species]() {
Expand Down

0 comments on commit cae4d97

Please sign in to comment.