revert to use sync

TODO: this is deprecated and should be updated using next was causing timeline to show on first load.
This commit is contained in:
Joffrey JAFFEUX 2019-04-05 17:58:49 +02:00 committed by GitHub
parent 6b243c1179
commit 2a7e35896c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -224,7 +224,7 @@ I18n.translations[I18n.currentLocale()].js.composer.contains_dtoc = I18n.t(
}); });
})(() => {}); })(() => {});
$.fn.dtoc = $elem => { $.fn.dtoc = $elem => {
run.next(() => { run.scheduleOnce("sync", () => {
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"]`);