[fix] unGroupHooks helper.

This commit is contained in:
opi 2015-11-15 22:25:55 +01:00
parent 6a0fb94a3c
commit f2c8c4fd1f
2 changed files with 6 additions and 3 deletions

File diff suppressed because one or more lines are too long

View file

@ -387,15 +387,18 @@ var app = Sammy('#main', function (sam) {
if (data['apps']==undefined)
data['apps']=[];
else if (data['apps'].constructor !== Array)
data['apps']=[params['apps']];
data['apps']=[data['apps']];
if (data['hooks'].length==0)
data['ignore_hooks']='';
if (data['apps'].length==0)
data['ignore_apps']='';
// Some hook value contains multiple hooks separated by commas
var split_hooks=[];
$.each(data['hooks'], function(i, hook) {
split_hooks.concat(hook.split(','));
split_hooks = split_hooks.concat(hook.split(','));
});
data['hooks']=split_hooks;
return data;
},