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.clearStorage();
replyWidget.setPending( true );
window.location = data.tempusercreatedredirect || mw.util.getUrl( pageName, {
dtrepliedto: threadItem.id,
dttempusercreated: '1'
} );
var params = { dtrepliedto: threadItem.id };
if ( data.tempusercreated ) {
params.dttempusercreated = '1';
}
window.location = data.tempusercreatedredirect || mw.util.getUrl( pageName, params );
logSaveSuccess();
return;
}