Fix temp user popup appearing on every new page creation

Follow-up to c0f5a95504.
I missed that this code path can also be reached when
a temp user has not in fact been created.

Bug: T345569
Change-Id: Ia37760c674074b12baa17d842fa4f4d95ca20c5e
This commit is contained in:
Bartosz Dziewoński 2023-09-04 17:17:06 +02:00
parent bca916d617
commit efceaaa2ad

View file

@ -689,10 +689,11 @@ function update( data, threadItem, pageName, replyWidget ) {
replyWidget.unbindBeforeUnloadHandler(); replyWidget.unbindBeforeUnloadHandler();
replyWidget.clearStorage(); replyWidget.clearStorage();
replyWidget.setPending( true ); replyWidget.setPending( true );
window.location = data.tempusercreatedredirect || mw.util.getUrl( pageName, { var params = { dtrepliedto: threadItem.id };
dtrepliedto: threadItem.id, if ( data.tempusercreated ) {
dttempusercreated: '1' params.dttempusercreated = '1';
} ); }
window.location = data.tempusercreatedredirect || mw.util.getUrl( pageName, params );
logSaveSuccess(); logSaveSuccess();
return; return;
} }