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 setup from running twice #4726

Merged
merged 1 commit into from
Aug 7, 2020

Conversation

akshay-99
Copy link
Member

Resolves #4669

Changes:

Before calling _setup ( which in turn calls user-defined setup ), check if it has already run before. Quite a simple fix but seems to work.

PR Checklist

Copy link
Member

@lmccart lmccart left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice!

@lmccart
Copy link
Member

lmccart commented Aug 5, 2020

does this still allow you to have multiple p5 sketches on one page?

@akshay-99
Copy link
Member Author

@lmccart Multiple p5 sketches running in instance mode would still work

@lmccart lmccart merged commit dd7547d into processing:main Aug 7, 2020
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.

setup runs twice in instance mode in the presence of p5.sound and large browser extensions
2 participants