1
0
mirror of https://github.com/devcode-it/openstamanager.git synced 2025-01-09 06:05:28 +01:00
This commit is contained in:
Dasc3er 2020-09-29 09:17:17 +02:00
parent 80131f0496
commit f49a62665a

View File

@ -207,17 +207,12 @@ jQuery.fn.selectData = function () {
let selectData = this.select2('data');
if (this.prop('multiple')) {
let results = [];
for (const option of selectData) {
results.push(option.element.dataset);
}
return results;
} else if (selectData.length === 0) {
return undefined;
} else {
return selectData[0].element.dataset;
return selectData;
} else if (selectData.length !== 0 && selectData[0].id) {
return selectData[0];
}
return undefined;
};
/**