using let if existingItems is strangely undefined

This commit is contained in:
Dobromir Popov
2024-04-05 20:20:23 +03:00
parent 077359203e
commit dea97cf7e5

View File

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