Bug 24661: (RM follow-up) Check lang is defined

This adds a check that the lang variable is defined before testing
against it. In normal operation this is likely a no-op, but it is
required for compiling templates during QA.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
This commit is contained in:
Martin Renvoize 2020-02-25 14:26:57 +00:00
parent d7407055a8
commit b2651484ed
No known key found for this signature in database
GPG Key ID: 422B469130441A0F
1 changed files with 1 additions and 1 deletions

View File

@ -26,7 +26,7 @@
var Koha = {};
</script>
[% IF lang != 'en' %]
[% IF lang && lang != 'en' %]
[% Asset.js(lang _ '/js/locale_data.js') | $raw %]
[% END %]
[% Asset.js('js/Gettext.js') | $raw %]