Merge pull request #480 from NativeScript/feature/action-bar-on-main-page

FIX: Adnroid app crashes when there is action bar on main page
This commit is contained in:
Alexander Vakrilov
2015-07-27 10:25:15 +03:00

View File

@@ -208,13 +208,15 @@ export class ActionBar extends common.ActionBar {
}
public _onTitlePropertyChanged() {
if (frame.topmost().currentPage === this.page) {
var topFrame = frame.topmost();
if (topFrame && topFrame.currentPage === this.page) {
this._updateTitleAndTitleView(frame.topmost().android.actionBar);
}
}
public _onIconPropertyChanged() {
if (frame.topmost().currentPage === this.page) {
var topFrame = frame.topmost();
if (topFrame && topFrame.currentPage === this.page) {
this._updateIcon(frame.topmost().android.actionBar);
}
}