mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-11-13 17:48:17 +00:00
ArticleTarget: Remove duplicate error codes when logging
Occasionally we end up logging error codes like "abusefilter-disallowed,abusefilter-disallowed,abusefilter-warning" when someone hits a bunch of different filtes. Change-Id: I967d374d13473ca684412b380d732653a3ceaff3
This commit is contained in:
parent
09f3c43759
commit
46f661ac66
|
@ -804,9 +804,9 @@ ve.init.mw.ArticleTarget.prototype.saveFail = function ( doc, saveData, wasRetry
|
|||
|
||||
var errorCodes;
|
||||
if ( data.errors ) {
|
||||
errorCodes = data.errors.map( function ( err ) {
|
||||
errorCodes = OO.unique( data.errors.map( function ( err ) {
|
||||
return err.code;
|
||||
} ).join( ',' );
|
||||
} ) ).join( ',' );
|
||||
} else if ( ve.getProp( data, 'visualeditoredit', 'edit', 'captcha' ) ) {
|
||||
// Eww
|
||||
errorCodes = 'captcha';
|
||||
|
|
Loading…
Reference in a new issue