fix: content being undefined

This commit is contained in:
Alι Aryαɴ
2025-04-11 03:32:58 +05:00
committed by GitHub
parent c037f68c2d
commit e3078f30c8

View File

@@ -23,7 +23,7 @@ export class USyncStatusProtocol implements USyncQueryProtocol {
parser(node: BinaryNode): StatusData | undefined {
if(node.tag === 'status') {
assertNodeErrorFree(node)
let status: string | null = node?.content!.toString()
let status: string | null = node?.content?.toString()
const setAt = new Date(+(node?.attrs.t || 0) * 1000)
if(!status) {
if(+node.attrs?.code === 401) {
@@ -41,4 +41,4 @@ export class USyncStatusProtocol implements USyncQueryProtocol {
}
}
}
}
}