Do not add a background image if the icon is not defined

Bug: T172500
Change-Id: Ib658651e04090ec4f5bc1f5bacbbfb0d7e7f893e
This commit is contained in:
Pavel Astakhov 2017-08-04 15:45:33 +06:00
parent 6e0e71844b
commit 3e14a90fb7

View file

@ -336,7 +336,7 @@
$button
.addClass( 'wikiEditor-toolbar-spritedButton' )
.css( 'backgroundPosition', offsetOrIcon[ 0 ] + 'px ' + offsetOrIcon[ 1 ] + 'px' );
} else {
} else if ( offsetOrIcon !== undefined ) { // Bug T172500
$button
.css( 'background-image', 'url(' + offsetOrIcon + ')' );
}