aboutsummaryrefslogtreecommitdiffstats
path: root/server/src/main/java/com/vaadin/ui/TabSheet.java
diff options
context:
space:
mode:
Diffstat (limited to 'server/src/main/java/com/vaadin/ui/TabSheet.java')
-rw-r--r--server/src/main/java/com/vaadin/ui/TabSheet.java4
1 files changed, 3 insertions, 1 deletions
diff --git a/server/src/main/java/com/vaadin/ui/TabSheet.java b/server/src/main/java/com/vaadin/ui/TabSheet.java
index 39621b075e..8cb7243473 100644
--- a/server/src/main/java/com/vaadin/ui/TabSheet.java
+++ b/server/src/main/java/com/vaadin/ui/TabSheet.java
@@ -585,7 +585,9 @@ public class TabSheet extends AbstractComponentContainer
*/
private void setSelected(Component component) {
Tab tab = tabs.get(selected);
- if (tab != null && !Objects.equals(tab.getComponent(), component) && tab.getComponent() != null && tab.getComponent().isAttached()) {
+ if (tab != null && !Objects.equals(tab.getComponent(), component)
+ && tab.getComponent() != null
+ && tab.getComponent().isAttached()) {
tab.getComponent().detach();
tab.getComponent().attach(); // ugly hack
}