diff --git a/koha-tmpl/intranet-tmpl/lib/koha/cateditor/text-marc.js b/koha-tmpl/intranet-tmpl/lib/koha/cateditor/text-marc.js index 5846045bb7..b7623de805 100644 --- a/koha-tmpl/intranet-tmpl/lib/koha/cateditor/text-marc.js +++ b/koha-tmpl/intranet-tmpl/lib/koha/cateditor/text-marc.js @@ -95,7 +95,8 @@ define( [ 'marc-record' ], function( MARC ) { } } ); - return errors.length ? { errors: errors } : record; + if( errors.length ) { record.errors = errors; } + return record; } }; } );