Skip to content

Commit

Permalink
accounts selectors [nfc]: Pure refactor of getServerVersion.
Browse files Browse the repository at this point in the history
  • Loading branch information
Chris Bobbe committed Apr 17, 2020
1 parent c29a5cb commit bbad956
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions src/account/accountsSelectors.js
Original file line number Diff line number Diff line change
Expand Up @@ -157,10 +157,5 @@ export const getIdentity: Selector<Identity> = createSelector(
* See the `zulipVersion` property of `Account` for details on how this
* information is kept up to date.
*/
export const getServerVersion = (state: GlobalState): ZulipVersion | null => {
const activeAccount: Account = getActiveAccount(state);
if (activeAccount.zulipVersion === null) {
return null;
}
return activeAccount.zulipVersion;
};
export const getServerVersion = (state: GlobalState): ZulipVersion | null =>
getActiveAccount(state).zulipVersion;

0 comments on commit bbad956

Please sign in to comment.