Skip to content

Commit

Permalink
revert optional status
Browse files Browse the repository at this point in the history
  • Loading branch information
maximpertsov committed Apr 18, 2023
1 parent e40b0f3 commit cd00be2
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions web/frontend/src/components/slam.vue
Original file line number Diff line number Diff line change
Expand Up @@ -56,10 +56,13 @@ const fetchSLAMMap = (name: string): Promise<Uint8Array> => {
const chunk = res.getPointCloudPcdChunk_asU8();
chunks.push(chunk);
});
getPointCloudMap.on('status', (status?) => {
const { code, details, metadata } = status!;
if (code !== 0) {
const error = { message: details, code, metadata };
getPointCloudMap.on('status', (status: { code: number, details: string, metadata: grpc.Metadata }) => {
if (status.code !== 0) {
const error = {
message: status.details,
code: status.code,
metadata: status.metadata,
};
reject(error);
}
});
Expand Down

0 comments on commit cd00be2

Please sign in to comment.