Merge pull request #1728 from NativeScript/feature/action-bar-fix

Action bar safety checks in property changed events
This commit is contained in:
Alexander Vakrilov
2016-03-09 14:47:44 +01:00

View File

@@ -301,14 +301,14 @@ export class ActionBar extends common.ActionBar {
public _onTitlePropertyChanged() {
var topFrame = frame.topmost();
if (topFrame && topFrame.currentPage === this.page) {
if (this._toolbar && topFrame && topFrame.currentPage === this.page) {
this._updateTitleAndTitleView();
}
}
public _onIconPropertyChanged() {
var topFrame = frame.topmost();
if (topFrame && topFrame.currentPage === this.page) {
if (this._toolbar && topFrame && topFrame.currentPage === this.page) {
this._updateIcon();
}
}