-
-
Notifications
You must be signed in to change notification settings - Fork 5.7k
[BUG] hooks run twice unexpectedly #1732
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Labels
bug
confirmed as a bug
Comments
Here are two stack traces, one from each doneEach call, based on commit 9658ed4 with minification disabled, in lib/docsify.min.js:
In this example, one doneEach happens due to the |
This may be an issue that only happens in an e2e test (as I just discovered), although I thought I experienced this before elsewhere. |
Addressed by #1736. |
9 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Bug Report
Steps to reproduce
Not sure what the cause is yet, but I've written local playwright tests that verify that
doneEach
runs twice on initial page load for a particular test (so the case is isolated).This is unexpected. For most sites/tests, doneEach runs once, but in some rare case it runs twice. I have experienced this before in practice too.
This might possibly explain what I was seeing in #906 with scripts running twice
What is current behaviour
doneEach
runs twice on initial render sometimes.What is the expected behaviour
It should run one time all the time, or twice all the time. Or something similar, but right now there is something that seems inconsistent.
Other relevant information
Bug does still occur when all/other plugins are disabled?
Your OS: Linux
Node.js version: 17
npm/yarn version: 8
Browser version: Chrome
Docsify version: 4.12.2
Docsify plugins: Added a plugin in docs/index.html to log, and log happens twice.
Please create a reproducible sandbox
Not sure how yet.
Mention the docsify version in which this bug was not present (if any)
The text was updated successfully, but these errors were encountered: