cleanup: Use default parameters where appropriate
Since ES6 it is possible to set an explicit default value for optional parameters (overriding the implicit value of 'undefined'). Use them for a nice small cleanup. https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/626
This commit is contained in:

committed by
Georges Basile Stavracas Neto

parent
16ca7a21a7
commit
404bc34089
@ -33,9 +33,7 @@ function _fixMarkup(text, allowMarkup) {
|
||||
}
|
||||
|
||||
var URLHighlighter = class URLHighlighter {
|
||||
constructor(text, lineWrap, allowMarkup) {
|
||||
if (!text)
|
||||
text = '';
|
||||
constructor(text = '', lineWrap, allowMarkup) {
|
||||
this.actor = new St.Label({ reactive: true, style_class: 'url-highlighter',
|
||||
x_expand: true, x_align: Clutter.ActorAlign.START });
|
||||
this._linkColor = '#ccccff';
|
||||
|
Reference in New Issue
Block a user