@@ -520,7 +520,7 @@ class ShellBar extends UI5Element {
520
520
const newItems = this . _getAllItems ( hasIcons ) . map ( info => {
521
521
const isOverflowIcon = info . classes . indexOf ( "ui5-shellbar-overflow-button" ) !== - 1 ;
522
522
const isImageIcon = info . classes . indexOf ( "ui5-shellbar-image-button" ) !== - 1 ;
523
- const shouldStayOnScreen = isOverflowIcon || ( isImageIcon && this . profile ) ;
523
+ const shouldStayOnScreen = isOverflowIcon || ( isImageIcon && this . hasProfile ) ;
524
524
525
525
return Object . assign ( { } , info , {
526
526
classes : `${ info . classes } ${ shouldStayOnScreen ? "" : "ui5-shellbar-hidden-button" } ui5-shellbar-button` ,
@@ -785,14 +785,14 @@ class ShellBar extends UI5Element {
785
785
} ,
786
786
{
787
787
text : "Person" ,
788
- classes : `${ this . profile ? "" : "ui5-shellbar-invisible-button" } ui5-shellbar-image-button ui5-shellbar-button` ,
788
+ classes : `${ this . hasProfile ? "" : "ui5-shellbar-invisible-button" } ui5-shellbar-image-button ui5-shellbar-button` ,
789
789
priority : 4 ,
790
790
subclasses : "ui5-shellbar-image-buttonImage" ,
791
- style : `order: ${ this . profile ? 5 : - 10 } ;` ,
791
+ style : `order: ${ this . hasProfile ? 5 : - 10 } ;` ,
792
792
profile : true ,
793
793
id : `${ this . _id } -item-${ 3 } ` ,
794
- domOrder : this . profile ? ( ++ domOrder ) : - 1 ,
795
- show : this . profile ,
794
+ domOrder : this . hasProfile ? ( ++ domOrder ) : - 1 ,
795
+ show : this . hasProfile ,
796
796
press : this . _handleProfilePress . bind ( this ) ,
797
797
_tabIndex : "-1" ,
798
798
} ,
@@ -863,6 +863,10 @@ class ShellBar extends UI5Element {
863
863
return getRTL ( ) ? "rtl" : undefined ;
864
864
}
865
865
866
+ get hasProfile ( ) {
867
+ return ! ! this . profile . length ;
868
+ }
869
+
866
870
static async onDefine ( ) {
867
871
await Promise . all ( [
868
872
Icon . define ( ) ,
0 commit comments