Skip to content

Commit 0230b70

Browse files
authored
Do not call updateUserInfo when nickname and profileUrl are empty string (#75)
[UIKIT-1453] Do not call updateUserInfo when nickname and profileUrl are empty string
1 parent 972f97b commit 0230b70

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/lib/dux/sdk/thunks.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ export const handleConnection = ({
6666
userDispatcher({ type: INIT_USER, payload: user });
6767
// use nickname/profileUrl if provided
6868
// or set userID as nickname
69-
if (nickname !== user.nickname || profileUrl !== user.profileUrl) {
69+
if ((nickname !== user.nickname || profileUrl !== user.profileUrl) && (nickname !== '' || profileUrl !== '')) {
7070
newSdk.updateCurrentUserInfo(nickname || user.nickname, profileUrl || user.profileUrl)
7171
.then((namedUser) => {
7272
userDispatcher({ type: UPDATE_USER_INFO, payload: namedUser });

src/smart-components/App/stories/index.stories.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -204,9 +204,9 @@ export const user1 = () => fitPageSize(
204204
appId={appId}
205205
userId={array[0]}
206206
nickname={array[0]}
207+
profileUrl={addProfile}
207208
showSearchIcon
208209
allowProfileEdit
209-
profileUrl={addProfile}
210210
config={{ logLevel: 'all' }}
211211
queries={{}}
212212
replyType="QUOTE_REPLY"

0 commit comments

Comments
 (0)