-
Notifications
You must be signed in to change notification settings - Fork 93
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
fix(NcCounterBubble): show original count in title when shortened #6395
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.
Nice but the commit message is wrong, it says "NcCounterButton" but it is "NcCounterBubble" 😉
@@ -243,7 +243,7 @@ export default { | |||
methods: { | |||
humanizeCount(count) { | |||
if (this.raw) { | |||
return count | |||
return count.toString() |
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 prefer this but this is also fine for me :)
return count.toString() | |
return String(count) |
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 prefer .toString()
as a safer method. If something went wrong and count
is invalid, e.g. null
or undefined
, .toString()
fails explicitly while String
constructor successfully created string 'undefined'
which goes to UI or further to computations.
Signed-off-by: Grigorii K. Shartsev <[email protected]>
193acde
to
78cd95f
Compare
Fixed |
/backport to next |
☑️ Resolves
🖼️ Screenshots
🏁 Checklist
next
requested with a Vue 3 upgrade