Commit 4f85dc4c authored by Xavier Guimard's avatar Xavier Guimard

Improve JS (#1566)

parent 662dda22
Pipeline #4259 passed with stages
in 9 minutes and 52 seconds
......@@ -139,7 +139,7 @@ llapp.directive 'script', ['$htmlParams', ($htmlParams) ->
restrict: 'E'
terminal: true
compile: (element, attr) ->
if t = attr.type.match /text\/(menu|parameters)/
if attr.type and t = attr.type.match /text\/(menu|parameters)/
try
return $htmlParams.set t[1], JSON.parse(element[0].text)
catch e
......
// Generated by CoffeeScript 1.12.7
// Generated by CoffeeScript 1.12.8
/*
LemonLDAP::NG base app module
......@@ -159,7 +159,7 @@ LemonLDAP::NG base app module
terminal: true,
compile: function(element, attr) {
var e, t;
if (t = attr.type.match(/text\/(menu|parameters)/)) {
if (attr.type && (t = attr.type.match(/text\/(menu|parameters)/))) {
try {
return $htmlParams.set(t[1], JSON.parse(element[0].text));
} catch (error) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment