We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c71723e commit c7600a3Copy full SHA for c7600a3
src/viewer/App.tsx
@@ -61,11 +61,18 @@ const TimeStamp = ({time}: { time: Date }) => {
61
};
62
63
function base64ToArrayBuffer(base64: string) {
64
- const binary_string = window.atob(base64);
65
- const len = binary_string.length;
+ let binaryString: string;
+ try {
66
+ binaryString = window.atob(base64);
67
+ } catch (e) {
68
+ // TODO: the main reason for such an error is that currently there is no support for multiple websocket connections,
69
+ // e.g. webpack hot reloaders.
70
+ binaryString = "";
71
+ }
72
+ const len = binaryString.length;
73
const bytes = new Buffer(len);
74
for (let i = 0; i < len; i++) {
- bytes[i] = binary_string.charCodeAt(i);
75
+ bytes[i] = binaryString.charCodeAt(i);
76
}
77
return bytes;
78
0 commit comments