| Index: chrome/browser/resources/md_bookmarks/router.js
|
| diff --git a/chrome/browser/resources/md_bookmarks/router.js b/chrome/browser/resources/md_bookmarks/router.js
|
| index 11d1d40104c5a4cc6d9409b5f11687d5b9715b6c..2634fb32157b391a9bdafe884a755c145204af6e 100644
|
| --- a/chrome/browser/resources/md_bookmarks/router.js
|
| +++ b/chrome/browser/resources/md_bookmarks/router.js
|
| @@ -42,6 +42,7 @@ Polymer({
|
| this.watch('searchTerm_', function(state) {
|
| return state.search.term;
|
| });
|
| + this.updateFromStore();
|
| },
|
|
|
| /** @private */
|
| @@ -58,7 +59,12 @@ Polymer({
|
| var selectedId = this.queryParams_.id;
|
| if (selectedId && selectedId != this.selectedId_) {
|
| this.selectedId_ = selectedId;
|
| - this.dispatch(bookmarks.actions.selectFolder(selectedId));
|
| + // Need to dispatch a deferred action so that during page load
|
| + // `this.getState()` will only evaluate after the Store is initialized.
|
| + this.dispatchAsync(function(dispatch) {
|
| + dispatch(
|
| + bookmarks.actions.selectFolder(selectedId, this.getState().nodes));
|
| + }.bind(this));
|
| }
|
| },
|
|
|
|
|