mirror of
https://github.com/hcengineering/platform.git
synced 2026-10-01 14:05:05 +02:00
UBERF-8856: Fix space security query and schema update (#7413)
Signed-off-by: Andrey Sobolev <haiodo@gmail.com>
This commit is contained in:
@@ -106,7 +106,13 @@ export class RPCHandler {
|
||||
const decoder = new TextDecoder()
|
||||
_data = decoder.decode(_data)
|
||||
}
|
||||
return JSON.parse(_data.toString(), receiver)
|
||||
try {
|
||||
return JSON.parse(_data.toString(), receiver)
|
||||
} catch (err: any) {
|
||||
if (((err.message as string) ?? '').includes('Unexpected token')) {
|
||||
return this.packr.unpack(new Uint8Array(data))
|
||||
}
|
||||
}
|
||||
}
|
||||
return this.packr.unpack(new Uint8Array(data))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user