fix client compile error

This commit is contained in:
Dobromir Popov
2024-04-05 20:14:08 +03:00
parent 8becbfc926
commit 077359203e
2 changed files with 4 additions and 1 deletions

View File

@ -25,7 +25,8 @@ export default function AvailabilityForm({ publisherId, existingItems, inline, o
indexUrl: "/cart/availabilities"
};
existingitems = existingitems || [];
//coalsce existingItems to empty array
existingItems = existingItems || [];
const [editMode, setEditMode] = useState(existingItems.length > 0);
const [publisher, setPublisher] = useState({ id: publisherId });