Skip to content

Commit 1d54e21

Browse files
committed
fix(profile-my): prevent double-sending to backend
1 parent a780962 commit 1d54e21

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/app/components/profile/page-profile-my/page-profile-my.component.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,10 @@ export class PageProfileMyComponent implements OnInit, OnDestroy {
154154
discord: this.formProfile.controls.discord.value
155155
};
156156

157-
(this.profileEditRequest$ = this.backend.http.profileEditMy(edit).pipe(mapTo(undefined))).subscribe(() => {
157+
(this.profileEditRequest$ = this.backend.http.profileEditMy(edit).pipe(
158+
shareReplay(1),
159+
mapTo(undefined))
160+
).subscribe(() => {
158161
this.formProfile.enable();
159162
this.backend.refreshUser();
160163
});

0 commit comments

Comments
 (0)