Skip to content

Commit

Permalink
Add comments for getProfile -> getProfileOrNull change
Browse files Browse the repository at this point in the history
  • Loading branch information
canova committed Jul 19, 2019
1 parent 1214c5b commit c1fca76
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/actions/receive-profile.js
Original file line number Diff line number Diff line change
Expand Up @@ -1048,6 +1048,8 @@ export function getProfilesFromRawUrl(
);
}

// Profile may be null only for the `from-addon` dataSource since we do
// not `await` for retrieveProfileFromAddon function.
return {
profile: getProfileOrNull(getState()),
shouldSetupInitialUrlState,
Expand Down
2 changes: 2 additions & 0 deletions src/components/app/UrlManager.js
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,8 @@ class UrlManager extends React.PureComponent<Props> {
} = await getProfilesFromRawUrl(window.location);

// Manually coerce these into the proper type due to the FlowFixMe above.
// Profile may be null only for the `from-addon` dataSource since we do
// not `await` for retrieveProfileFromAddon function.
const profile: Profile | null = results.profile;
const shouldSetupInitialUrlState: boolean =
results.shouldSetupInitialUrlState;
Expand Down

0 comments on commit c1fca76

Please sign in to comment.