mirror of
https://github.com/Xahau/xahau.js.git
synced 2025-12-06 17:27:59 +00:00
fix: resolve browser issue with Error.captureStackTrace (#1663)
* fix webpacking error issue * fix eslint comment
This commit is contained in:
@@ -20,7 +20,10 @@ class XrplError extends Error {
|
||||
this.name = this.constructor.name
|
||||
this.message = message
|
||||
this.data = data
|
||||
Error.captureStackTrace(this, this.constructor)
|
||||
// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition -- `captureStackTrace` can be null in browsers
|
||||
if (Error.captureStackTrace != null) {
|
||||
Error.captureStackTrace(this, this.constructor)
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user