Skip to content

Commit

Permalink
Regression: Fix Avatar Url Provider when CDN_PREFIX_ALL is false (#17542
Browse files Browse the repository at this point in the history
)
  • Loading branch information
ggazzo authored May 6, 2020
1 parent 32c558f commit 04fb735
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion client/providers/AvatarUrlProvider.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@ export function AvatarUrlProvider({ children }) {
const cdn = useSetting('CDN_PREFIX_ALL');
const cdnPrefix = useSetting('CDN_PREFIX');

const avatarBase = useMemo(() => ({ baseUrl: `${ cdn && cdnPrefix }${ base }` }), [cdn, cdnPrefix]);
const avatarBase = useMemo(() => ({ baseUrl: `${ (cdn && cdnPrefix) || '' }${ base }` }), [cdn, cdnPrefix]);
return <Avatar.Context.Provider children={children} value={avatarBase} />;
}

0 comments on commit 04fb735

Please sign in to comment.