Skip to content

Commit

Permalink
fix(action-bar): ignore InvisibleNodes when adding title
Browse files Browse the repository at this point in the history
fixes #897
  • Loading branch information
sis0k0 committed Jul 18, 2017
1 parent 86a7099 commit 97b8c76
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions nativescript-angular/directives/action-bar.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import { View } from "tns-core-modules/ui/core/view";

import { isBlank } from "../lang-facade";
import {
InvisibleNode,
NgView,
ViewClassMeta,
registerElement,
Expand All @@ -16,7 +17,9 @@ const actionBarMeta: ViewClassMeta = {
const bar = <ActionBar>(<any>parent);
const childView = <any>child;

if (child instanceof NavigationButton) {
if (child instanceof InvisibleNode) {
return;
} else if (child instanceof NavigationButton) {
bar.navigationButton = childView;
childView.parent = bar;
} else if (child instanceof ActionItem) {
Expand All @@ -30,7 +33,9 @@ const actionBarMeta: ViewClassMeta = {
const bar = <ActionBar>(<any>parent);
const childView = <any>child;

if (child instanceof NavigationButton) {
if (child instanceof InvisibleNode) {
return;
} else if (child instanceof NavigationButton) {
if (bar.navigationButton === childView) {
bar.navigationButton = null;
}
Expand Down

0 comments on commit 97b8c76

Please sign in to comment.