Improve typing (#9474)
This commit is contained in:
parent
5f59ce182e
commit
fde9a527a7
4 changed files with 10 additions and 10 deletions
|
@ -57,8 +57,8 @@ export function messageForResourceLimitError(
|
|||
}
|
||||
}
|
||||
|
||||
export function messageForSyncError(err: MatrixError): ReactNode {
|
||||
if (err.errcode === 'M_RESOURCE_LIMIT_EXCEEDED') {
|
||||
export function messageForSyncError(err: Error): ReactNode {
|
||||
if (err instanceof MatrixError && err.errcode === 'M_RESOURCE_LIMIT_EXCEEDED') {
|
||||
const limitError = messageForResourceLimitError(
|
||||
err.data.limit_type,
|
||||
err.data.admin_contact,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue