Bug 28423: JavaScript error on MARC modifications page
This patch makes a minor change to the MARC modifications template so that the "mmtas" variable isn't defined if there is no JSON to be assigned as its value. To test, apply the patch and go to Administration -> MARC modification templates. - If necessary, add a template with at least one action. - Check the browser console, there should be no errors. - Click the "Edit" button corresponding to one of the template actions. - The details of the action should load correctly in the edit form and there should be no errors in the console. Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
This commit is contained in:
parent
e0a09413e8
commit
2454b2f58a
1 changed files with 3 additions and 1 deletions
|
@ -354,7 +354,9 @@
|
|||
[% Asset.js("js/tools-menu.js") | $raw %]
|
||||
[% Asset.js("js/marc_modification_templates.js") | $raw %]
|
||||
<script>
|
||||
var mmtas = [% ActionsLoop.json | $raw %]
|
||||
[% IF ActionsLoop %]
|
||||
var mmtas = [% ActionsLoop.json | $raw %]
|
||||
[% END %]
|
||||
</script>
|
||||
[% END %]
|
||||
|
||||
|
|
Loading…
Reference in a new issue