mirror of
https://github.com/sakaljurgis/best-choice.git
synced 2026-07-08 21:47:40 +00:00
changes
This commit is contained in:
@@ -376,10 +376,18 @@ export function ItemFormModal({
|
|||||||
for (const attribute of attributeEntries) {
|
for (const attribute of attributeEntries) {
|
||||||
const key = attribute.key.trim();
|
const key = attribute.key.trim();
|
||||||
if (!key) {
|
if (!key) {
|
||||||
|
if (!attribute.value.trim()) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
setError('Attribute name cannot be empty.');
|
setError('Attribute name cannot be empty.');
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const trimmedValue = attribute.value.trim();
|
||||||
|
if (!trimmedValue.length && !attribute.forcedString) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
const inference = inferScalarValue(
|
const inference = inferScalarValue(
|
||||||
attribute.value,
|
attribute.value,
|
||||||
attribute.forcedString,
|
attribute.forcedString,
|
||||||
|
|||||||
Reference in New Issue
Block a user