Bug 23045: Return record along with errors
We don't seem to directly handle the errors in most cases, let's always return the record To test: 1 - Add some blank lines to editor, previous patch is okay with this 2 - Add a line with just 'e' or some other incomplete field 3 - Try to save 4 - Note JS leader error 5 - Apply this patch 6 - No errors Signed-off-by: Liz Rea <wizzyrea@gmail.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> (cherry picked from commitf927d80112) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com> (cherry picked from commit1e2dc23401) Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
This commit is contained in:
parent
8b3e00174b
commit
b78fc7961d
|
|
@ -95,7 +95,8 @@ define( [ 'marc-record' ], function( MARC ) {
|
|||
}
|
||||
} );
|
||||
|
||||
return errors.length ? { errors: errors } : record;
|
||||
if( errors.length ) { record.errors = errors; }
|
||||
return record;
|
||||
}
|
||||
};
|
||||
} );
|
||||
|
|
|
|||
Loading…
Reference in New Issue