Commit 109bc3f6 authored by michaelpg's avatar michaelpg Committed by Commit bot

Fixes for cr-settings-page-header

BUG=485381

Review URL: https://codereview.chromium.org/1132613003

Cr-Commit-Position: refs/heads/master@{#329762}
parent 16bc5f81
<link rel="import" href="chrome://resources/polymer/v0_8/polymer/polymer.html">
<link rel="import" href="chrome://resources/polymer/v0_8/iron-pages/iron-pages.html">
<link rel="import" href="chrome://md-settings/routes.html">
<link rel="import" href="chrome://md-settings/settings_page/settings_page_header.html">
<link rel="import" href="chrome://md-settings/a11y_page/a11y_page.html">
<link rel="import" href="chrome://md-settings/date_time_page/date_time_page.html">
<link rel="import" href="chrome://md-settings/downloads_page/downloads_page.html">
......
......@@ -70,6 +70,8 @@ Polymer({
* @private
*/
getTopPageIcon_: function(pageStack) {
if (pageStack.length == 0)
return '';
return pageStack[0].icon;
},
......@@ -88,17 +90,21 @@ Polymer({
* @private
*/
getCurrentPageTitle_: function(pageStack) {
if (pageStack.length == 0)
return '';
return pageStack[0].pageTitle;
},
/** @private */
selectedPageChanged_: function() {
if (this.selectedPage.subpage) {
if (this.selectedPage && this.selectedPage.subpage) {
// NOTE: Must reassign pageStack rather than doing push() so that the
// computed property (parentPages) will be notified of the update.
this.pageStack = this.pageStack.concat(this.selectedPage);
} else {
} else if (this.selectedPage) {
this.pageStack = [this.selectedPage];
} else {
this.pageStack = [];
}
},
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment