Skip to content

Unify null comparisons #11481

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 1 commit into from
Jul 27, 2014
Merged

Unify null comparisons #11481

merged 1 commit into from
Jul 27, 2014

Conversation

wouterj
Copy link
Member

@wouterj wouterj commented Jul 26, 2014

Q A
Fixed tickets -
License MIT

@jakzal
Copy link
Contributor

jakzal commented Jul 26, 2014

👍

1 similar comment
@Tobion
Copy link
Contributor

Tobion commented Jul 26, 2014

👍

@fabpot
Copy link
Member

fabpot commented Jul 27, 2014

Thank you @wouterj.

@fabpot fabpot merged commit be04c50 into symfony:2.3 Jul 27, 2014
fabpot added a commit that referenced this pull request Jul 27, 2014
This PR was merged into the 2.3 branch.

Discussion
----------

Unify null comparisons

| Q             | A
| ------------- | ---
| Fixed tickets | -
| License       | MIT

Commits
-------

be04c50 Unify null comparisons
@wouterj wouterj deleted the unify_null branch July 27, 2014 09:48
@@ -68,20 +68,20 @@
menu = document.getElementById('navigation'), savedState = Sfjs.getPreference('menu/displayState'),
displayState, elem, className;

if (savedState == null) {
if (null === savedState) {
Copy link
Contributor

Choose a reason for hiding this comment

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

You won't catch undefined with this check. null == savedState <=> null === savedState || undefined === savedState.

Not sure if this was intended here.

Copy link
Contributor

Choose a reason for hiding this comment

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

Applies further down, too.

Copy link
Member

Choose a reason for hiding this comment

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

Looks like it was replaced automatically (this part is JavaScript). @wouterj Can you have a look at this?

Copy link
Member Author

Choose a reason for hiding this comment

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

I've checked all JS conditions comparing with null in this PR and they all remain to work. All functions used in these conditions return null or a value.

Copy link
Member Author

Choose a reason for hiding this comment

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

Thanks @apfelbox for noting this. You've a sharp eye :)

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.

5 participants
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy