Skip to content

Remove second call of _updateWindowSize() #7847

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

Merged
merged 6 commits into from
Jun 19, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions src/core/main.js
Original file line number Diff line number Diff line change
@@ -657,9 +657,6 @@ class p5 {
}
};

// ensure correct reporting of window dimensions
this._updateWindowSize();

const friendlyBindGlobal = this._createFriendlyGlobalFunctionBinder();

// If the user has created a global setup or draw function,
@@ -699,6 +696,7 @@ class p5 {
p5._checkForUserDefinedFunctions(this);
}

// ensure correct reporting of window dimensions
this._updateWindowSize();

// call any registered init functions