Skip to content

Commit

Permalink
fix(update item): fix bug: add item page always on update item mode
Browse files Browse the repository at this point in the history
fix #80
  • Loading branch information
ismail-benlaredj committed Nov 7, 2023
1 parent 78157c6 commit 7ccf00b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/pages/add-item/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ function AddItemPage() {
const [files, setFiles] = useState();
const [uploadFile] = UseUploadImage();
const itemQueryData = router.query;
const updateItemPageMode = !itemQueryData.isEmpty;
const updateItemPageMode = Object.keys(itemQueryData).length !== 0;
let inputDefaultValues = {};
if (updateItemPageMode) {
inputDefaultValues = {
Expand Down

0 comments on commit 7ccf00b

Please sign in to comment.