DEV: the afterRender queue is too late

Since the component adds dynamic id attributes to headings that don't have ids, we need to do things a bit sooner otherwise external linking to an anchor of a heading with dynamic id will not work.
This commit is contained in:
Joe 2019-04-17 06:50:08 +08:00 committed by GitHub
parent 6eebb21760
commit 4f25b2d213
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -257,7 +257,7 @@
})(() => {});
api.decorateCooked($elem => {
run.scheduleOnce("afterRender", () => {
run.scheduleOnce("actions", () => {
if ($elem.hasClass("d-editor-preview")) return;
if (!$elem.parents("article#post_1").length) return;