Skip to content
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

Prevent double initialization #3696

Closed
wants to merge 1 commit into from

Conversation

EarlMilktea
Copy link

@EarlMilktea EarlMilktea commented Oct 24, 2024

Related to #3645 .

This PR prevents .initialize from running multiple times.

doubled

↑: Navigation arrow doubly rendered

@EarlMilktea EarlMilktea marked this pull request as ready for review October 24, 2024 20:36
hakimel added a commit that referenced this pull request Oct 25, 2024
@hakimel
Copy link
Owner

hakimel commented Oct 25, 2024

Preventing double-initialization is a great idea. To be honest, I was surprised this wasn't already in place 😅

Since we have an initialized flag I think it's clearer to use that instead of checking DOM references. I've added this in 16ac4b0

Let me know if I missed anything and I'll be happy to switch to the solution you proposed instead.

@hakimel hakimel closed this Oct 25, 2024
@EarlMilktea
Copy link
Author

@hakimel

Your suggestion looks good to me.
Let me thank you here for developing/maintaining this great package!

@EarlMilktea EarlMilktea deleted the prevent-double-init branch October 25, 2024 08:40
gbastkowski pushed a commit to gbastkowski/reveal.js that referenced this pull request Nov 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants