mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/RevisionSlider
synced 2024-11-28 01:00:08 +00:00
Do not fail when name of the user performing the revision is not available
For example when user name is not visible due to RevisionDelete the script crashed. This makes it check if there is a user name defined and not try to show it if there is none. Bug: T135198 Change-Id: I43ce0e49e13ad6262cc60fd938c486ea3e328e64
This commit is contained in:
parent
a2774984c4
commit
225f48ac52
|
@ -56,9 +56,11 @@
|
|||
var $tooltip = $( '<div>' )
|
||||
.append(
|
||||
$( '<p>' ).append( $( '<b>' ).text( rev.getFormattedDate() ) ),
|
||||
$( '<bdi>' ).append( $( '<p>' ).text(
|
||||
mw.msg( 'revisionslider-label-user', mw.html.escape( rev.getUser() ) )
|
||||
) ),
|
||||
rev.getUser() ?
|
||||
$( '<bdi>' ).append( $( '<p>' ).text(
|
||||
mw.msg( 'revisionslider-label-user', mw.html.escape( rev.getUser() ) )
|
||||
) )
|
||||
: '',
|
||||
rev.getComment() ?
|
||||
$( '<bdi>' ).append(
|
||||
$( '<p>' ).append( $( '<i>' ).text(
|
||||
|
|
Loading…
Reference in a new issue