aboutsummaryrefslogtreecommitdiff
path: root/vnext/src
diff options
context:
space:
mode:
Diffstat (limited to 'vnext/src')
-rw-r--r--vnext/src/index.js11
1 files changed, 10 insertions, 1 deletions
diff --git a/vnext/src/index.js b/vnext/src/index.js
index 8064dd1f..5f3c262e 100644
--- a/vnext/src/index.js
+++ b/vnext/src/index.js
@@ -7,7 +7,16 @@ import './index.css';
const Juick = lazy(() => import('./App'));
-const props = window.__PROPS__ ? JSON.parse(window.atob(window.__PROPS__)) : {};
+function fromBinary(encoded) {
+ const binary = window.atob(encoded);
+ const bytes = new Uint8Array(binary.length);
+ for (let i = 0; i < bytes.length; i++) {
+ bytes[i] = binary.charCodeAt(i);
+ }
+ return String.fromCharCode(...new Uint16Array(bytes.buffer));
+}
+
+const props = window.__PROPS__ ? JSON.parse(fromBinary(window.__PROPS__)) : {};
const JuickApp = () => (
<StrictMode>