-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[Messenger] Fix DataCollector template #30078
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
[Messenger] Fix DataCollector template #30078
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have doubts
<div class="tab"> | ||
{% set messages = collector.messages %} | ||
{% set exceptionsCount = collector.exceptionsCount %} | ||
<h3 class="tab-title">All<span class="badge {{ exceptionsCount ? exceptionsCount == messages|length ? 'status-error' : 'status-some-errors' }}">{{ messages|length }}</span></h3> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Taking advantage of the fact that you are refactoring why you do not use a strict comparison?
<h3 class="tab-title">All<span class="badge {{ exceptionsCount ? exceptionsCount == messages|length ? 'status-error' : 'status-some-errors' }}">{{ messages|length }}</span></h3> | |
<h3 class="tab-title">All<span class="badge {{ exceptionsCount ? exceptionsCount === messages|length ? 'status-error' : 'status-some-errors' }}">{{ messages|length }}</span></h3> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Twig doesn't have a ===
operator.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
haha ... ups ... I missed it ... hehe
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But it has:
exceptionsCount is same as (messages|length)
No sure it worth using it here anyway.
Thank you @ottaviano. |
This PR was merged into the 4.2 branch. Discussion ---------- [Messenger] Fix DataCollector template | Q | A | ------------- | --- | Branch? | 4.2 | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | ~ | License | MIT | Doc PR | ~ It's for adding a closing DIV tag on L96 (+ re-indent the HTML code) Commits ------- 146ae74 [Messenger] Fix DataCollector template
It's for adding a closing DIV tag on L96 (+ re-indent the HTML code)