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

@ -4,6 +4,8 @@ FROM node:current-alpine
# Set environment variables for Node.js
ENV NODE_ENV=production
# ENV MYSQL_ROOT_PASSWORD=pass
ENV MYSQL_DATABASE=cart
# Create and set the working directory
WORKDIR /app

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 });