From f17a272b6d6ec5e2dd3e8f41491178d0cee51062 Mon Sep 17 00:00:00 2001 From: nathangray Date: Wed, 26 Jul 2017 15:06:37 -0600 Subject: [PATCH] * Addressbook - Fix favorites that included a selected organisation did not get correctly applied --- addressbook/js/app.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/addressbook/js/app.js b/addressbook/js/app.js index b2e312d972..18df3bec4f 100644 --- a/addressbook/js/app.js +++ b/addressbook/js/app.js @@ -1008,10 +1008,13 @@ app.classes.addressbook = AppJS.extend( // Check to see if it's not there if(options && (options.find && - !grouped.options.select_options.find(function(e) {console.log(e); return e.value === state.state.grouped_view;}) || - !options[state.state.grouped_view] + !options.find(function(e) {console.log(e); return e.value === state.state.grouped_view;}) || + typeof options.find === 'undefined' && !options[state.state.grouped_view] )) { + window.setTimeout(function() { + app.addressbook.setState(state); + }, 500); var nm = index.widgetContainer.getWidgetById('nm'); var action = nm.controller._actionManager.getActionById('view_org'); var senders = [{_context: {_widget: nm}}];