fix: signal null typerror

TypeError: Cannot read properties of null (reading 'signal')
This commit is contained in:
skidoodle 2024-12-05 07:59:13 +01:00 committed by GitHub
parent e45516d73a
commit 7db3cb0b59
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -129,7 +129,7 @@ class HTTPTracker extends Tracker {
}
const cleanup = () => {
if (!controller.signal.aborted) {
if (!controller?.signal && !controller.signal.aborted) {
arrayRemove(this.cleanupFns, this.cleanupFns.indexOf(cleanup))
controller.abort()
controller = null