Merge "Fix more to support undefined behaviour"
This commit is contained in:
@@ -55,6 +55,9 @@ limitations under the License.
|
||||
* @return {boolean}
|
||||
*/
|
||||
isColumnHidden(columnToCheck, columnsToDisplay) {
|
||||
if ([columnsToDisplay, columnToCheck].some(arg => arg === undefined)) {
|
||||
return false;
|
||||
}
|
||||
return !columnsToDisplay.includes(columnToCheck);
|
||||
},
|
||||
|
||||
|
||||
@@ -187,8 +187,13 @@
|
||||
if (account) {
|
||||
this.showNumber = !!(preferences &&
|
||||
preferences.legacycid_in_change_table);
|
||||
this.visibleChangeTableColumns = preferences.change_table.length > 0 ?
|
||||
this.getVisibleColumns(preferences.change_table) : this.columnNames;
|
||||
if (preferences.change_table &&
|
||||
preferences.change_table.length > 0) {
|
||||
this.visibleChangeTableColumns =
|
||||
this.getVisibleColumns(preferences.change_table);
|
||||
} else {
|
||||
this.visibleChangeTableColumns = this.columnNames;
|
||||
}
|
||||
} else {
|
||||
// Not logged in.
|
||||
this.showNumber = false;
|
||||
|
||||
@@ -305,7 +305,8 @@
|
||||
if (!account) { return; }
|
||||
|
||||
this.$.restAPI.getPreferences().then(prefs => {
|
||||
this._userLinks = prefs.my.map(this._fixCustomMenuItem);
|
||||
this._userLinks = prefs && prefs.my ?
|
||||
prefs.my.map(this._fixCustomMenuItem) : [];
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user