mirror of
https://github.com/discourse/DiscoTOC.git
synced 2025-02-16 16:34:49 +00:00
FIX: uses run.next()
This commit is contained in:
parent
a5ec5a1e8e
commit
6b243c1179
@ -224,7 +224,7 @@ I18n.translations[I18n.currentLocale()].js.composer.contains_dtoc = I18n.t(
|
|||||||
});
|
});
|
||||||
})(() => {});
|
})(() => {});
|
||||||
$.fn.dtoc = $elem => {
|
$.fn.dtoc = $elem => {
|
||||||
run.scheduleOnce("next", () => {
|
run.next(() => {
|
||||||
if ($elem.hasClass("d-editor-preview")) return;
|
if ($elem.hasClass("d-editor-preview")) return;
|
||||||
if (!$elem.parents("article#post_1").length) return;
|
if (!$elem.parents("article#post_1").length) return;
|
||||||
const dToc = $elem.find(`[data-theme-toc="true"]`);
|
const dToc = $elem.find(`[data-theme-toc="true"]`);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user