Prevent javascript error if no value is set for the multiselect

This commit is contained in:
Michael Gapczynski 2012-12-24 13:55:37 -05:00
parent 3c08d2ba23
commit a0e47a2c67
1 changed files with 6 additions and 1 deletions

View File

@ -27,11 +27,16 @@ OC.MountConfig={
classOptions[$(input).data('parameter')] = $(input).val();
}
});
if ($('#externalStorage').data('admin') === true) {
var multiselect = $(tr).find('.chzn-select').val();
if (multiselect == null) {
return false;
}
}
if (addMountPoint) {
var status = false;
if ($('#externalStorage').data('admin') === true) {
var isPersonal = false;
var multiselect = $(tr).find('.chzn-select').val();
var oldGroups = $(tr).find('.applicable').data('applicable-groups');
var oldUsers = $(tr).find('.applicable').data('applicable-users');
$.each(multiselect, function(index, value) {