Merge pull request #6547 from thornbill/trim-lib-name

This commit is contained in:
Bill Thornton
2025-02-21 01:14:42 -05:00
committed by GitHub
2 changed files with 3 additions and 3 deletions
@@ -42,10 +42,10 @@ function onAddLibrary(e) {
isCreating = true;
loading.show();
const dlg = dom.parentWithClass(this, 'dlg-librarycreator');
const name = dlg.querySelector('#txtValue').value;
const name = dlg.querySelector('#txtValue').value.trim();
let type = dlg.querySelector('#selectCollectionType').value;
if (name.length == 0 || name.trim().length !== name.length) {
if (name.length === 0) {
alert({
text: globalize.translate('LibraryNameInvalid'),
type: 'error'