[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) if (data['apps']==undefined)
data['apps']=[]; data['apps']=[];
else if (data['apps'].constructor !== Array) else if (data['apps'].constructor !== Array)
data['apps']=[params['apps']]; data['apps']=[data['apps']];
if (data['hooks'].length==0) if (data['hooks'].length==0)
data['ignore_hooks']=''; data['ignore_hooks']='';
if (data['apps'].length==0) if (data['apps'].length==0)
data['ignore_apps']=''; data['ignore_apps']='';
// Some hook value contains multiple hooks separated by commas
var split_hooks=[]; var split_hooks=[];
$.each(data['hooks'], function(i, hook) { $.each(data['hooks'], function(i, hook) {
split_hooks.concat(hook.split(',')); split_hooks = split_hooks.concat(hook.split(','));
}); });
data['hooks']=split_hooks; data['hooks']=split_hooks;
return data; return data;
}, },