Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix app initialization race when issuing annotation search query #2592

Closed
wants to merge 1 commit into from

Conversation

robertknight
Copy link
Member

If the initial annotation search query was constructed
before the user's session state had been retrieved,
the groups list was empty and groups.focused() returned null
in WidgetController._loadAnnotationsFrom

This commit resolves the issue by adding a 'groups.ready()'
function which returns a promise once the groups list is ready.

It currently just returns the session.load().$promise.

Fixes #2590

If the initial annotation search query was constructed
before the user's session state had been retrieved,
the groups list was empty and groups.focused() returned null
in WidgetController._loadAnnotationsFrom

This commit resolves the issue by adding a 'groups.ready()'
function which returns a promise once the groups list is ready.

It currently just returns the session.load().$promise.

Fixes #2590
@robertknight
Copy link
Member Author

Talking with nick we decided on an alternative approach which is to make the main content view in the sidebar dependent on the session state being ready before it loads.

@nickstenning nickstenning deleted the gh2590-app_init_race branch October 16, 2015 13:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Race condition in app initialization
1 participant