| Index: ui/file_manager/file_manager/foreground/js/ui/list_container.js
|
| diff --git a/ui/file_manager/file_manager/foreground/js/ui/list_container.js b/ui/file_manager/file_manager/foreground/js/ui/list_container.js
|
| index 9d7fb65c4d0d4ad0d5b857b0ae98f64c1170eaaa..c5a4292a73069783abdfcc67c9d6208a7e7509b7 100644
|
| --- a/ui/file_manager/file_manager/foreground/js/ui/list_container.js
|
| +++ b/ui/file_manager/file_manager/foreground/js/ui/list_container.js
|
| @@ -154,26 +154,18 @@ ListContainer.prototype = /** @struct */ {
|
| * @return {!FileTable|!FileGrid}
|
| */
|
| get currentView() {
|
| - switch (this.currentListType) {
|
| - case ListContainer.ListType.DETAIL:
|
| - return this.table;
|
| - case ListContainer.ListType.THUMBNAIL:
|
| - return this.grid;
|
| - }
|
| - assertNotReached();
|
| + assert(this.currentListType !== ListContainer.ListType.UNINITIALIZED);
|
| + return this.currentListType === ListContainer.ListType.DETAIL ?
|
| + this.table : this.grid;
|
| },
|
|
|
| /**
|
| * @return {!cr.ui.List}
|
| */
|
| get currentList() {
|
| - switch (this.currentListType) {
|
| - case ListContainer.ListType.DETAIL:
|
| - return this.table.list;
|
| - case ListContainer.ListType.THUMBNAIL:
|
| - return this.grid;
|
| - }
|
| - assertNotReached();
|
| + assert(this.currentListType !== ListContainer.ListType.UNINITIALIZED);
|
| + return this.currentListType === ListContainer.ListType.DETAIL ?
|
| + this.table.list : this.grid;
|
| }
|
| };
|
|
|
|
|