mirror of
https://github.com/discourse/discourse.git
synced 2024-11-29 05:53:38 +08:00
26 lines
1.1 KiB
Diff
26 lines
1.1 KiB
Diff
diff --git a/pkg/standalone/content_tag.js b/pkg/standalone/content_tag.js
|
|
index 761f0fa84a1c545ac8908dd3c3b6d7e6c778791d..41a1112329742f8ee5351df4d56e068fceef4864 100644
|
|
--- a/pkg/standalone/content_tag.js
|
|
+++ b/pkg/standalone/content_tag.js
|
|
@@ -20,6 +20,7 @@ function takeObject(idx) {
|
|
return ret;
|
|
}
|
|
|
|
+const { TextDecoder, TextEncoder } = require('util');
|
|
const cachedTextDecoder = (typeof TextDecoder !== 'undefined' ? new TextDecoder('utf-8', { ignoreBOM: true, fatal: true }) : { decode: () => { throw Error('TextDecoder not available') } } );
|
|
|
|
if (typeof TextDecoder !== 'undefined') { cachedTextDecoder.decode(); };
|
|
diff --git a/pkg/standalone.js b/pkg/standalone.js
|
|
index cb50046539df05b41dcc842ffb98e354236f8d26..10eea2962ffd804905d85057bb25d5b30b4d2e11 100644
|
|
--- a/pkg/standalone.js
|
|
+++ b/pkg/standalone.js
|
|
@@ -1,5 +1,6 @@
|
|
-import init from "./standalone/content_tag.js";
|
|
+import { initSync } from "./standalone/content_tag.js";
|
|
+import module from "./standalone/content_tag_bg.wasm";
|
|
export { Preprocessor } from "./standalone/content_tag.js";
|
|
|
|
-await init();
|
|
+initSync(module);
|
|
|