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

Remove unneeded width & height checks #914

Merged

Conversation

schlessera
Copy link
Collaborator

The isTinyNode() method first ensures that all negative or zero values of either width or height are eliminated.

Then, after a check for responsiveness, it checks the width and height again for being a positive value. At his point, this is guaranteed to be true already by the first check, and thus only adds unneeded processing overhead.

This PR removes these unneeded checks, assuming that the initial check is correct.

@CLAassistant
Copy link

CLAassistant commented Oct 8, 2020

CLA assistant check
All committers have signed the CLA.

@patrickkettner
Copy link
Collaborator

thanks!

@patrickkettner patrickkettner merged commit 332a1a9 into ampproject:main Oct 11, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants