mirror of
https://github.com/discourse/discourse-math.git
synced 2025-06-29 18:52:09 +00:00
FIX: allows polls to work with discourse-math (#110)
This commit is contained in:
parent
b1cc1481c9
commit
e7ef2ec223
@ -1,4 +1,4 @@
|
|||||||
import { later } from "@ember/runloop";
|
import { later, next } from "@ember/runloop";
|
||||||
import { getURLWithCDN } from "discourse/lib/get-url";
|
import { getURLWithCDN } from "discourse/lib/get-url";
|
||||||
import loadScript from "discourse/lib/load-script";
|
import loadScript from "discourse/lib/load-script";
|
||||||
import { withPluginApi } from "discourse/lib/plugin-api";
|
import { withPluginApi } from "discourse/lib/plugin-api";
|
||||||
@ -112,7 +112,9 @@ function mathjax(elem, opts) {
|
|||||||
function initializeMath(api, discourseMathOptions) {
|
function initializeMath(api, discourseMathOptions) {
|
||||||
api.decorateCookedElement(
|
api.decorateCookedElement(
|
||||||
(element) => {
|
(element) => {
|
||||||
|
next(() => {
|
||||||
mathjax(element, discourseMathOptions);
|
mathjax(element, discourseMathOptions);
|
||||||
|
});
|
||||||
},
|
},
|
||||||
{ id: "mathjax" }
|
{ id: "mathjax" }
|
||||||
);
|
);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user