Bug 23045: TextMarc errors on blank lines
authorNick Clemens <nick@bywatersolutions.com>
Tue, 4 Jun 2019 14:25:53 +0000 (14:25 +0000)
committerFridolin Somers <fridolin.somers@biblibre.com>
Thu, 25 Jul 2019 12:03:30 +0000 (14:03 +0200)
commit2340df6f7c85c48a2ae68292204e9f16d485e7b9
tree587603a20505ea5f801e663122bd42c612ba955f
parent8c72eaaf86ee0d4d43e8d12b0f7b98992cd4d7a1
Bug 23045: TextMarc errors on blank lines

Since bug 16251 we use TextMarc to get some record fields, however, it throws an error when
processing blank lines.

We should just pass on these rather then erroring

To test:
1 - Define a new macro that delete more fields than it adds
  delete 245
2 - Run it
3 - Note an error in JS console, and helpers will not load
4 - Apply patch
5 - Reload, try again
6 - No error

Signed-off-by: Claire Gravely <claire.gravely@bsz-bw.de>
Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 545f38d13c210e4cb173e67d2578d825a9ffeb47)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
koha-tmpl/intranet-tmpl/lib/koha/cateditor/text-marc.js
koha-tmpl/intranet-tmpl/prog/en/includes/cateditor-widgets-marc21.inc