Skip to content

Commit

Permalink
set defaults
Browse files Browse the repository at this point in the history
  • Loading branch information
Xziy committed Nov 11, 2024
1 parent f11cc86 commit 012284a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
4 changes: 4 additions & 0 deletions models/Dish.js
Original file line number Diff line number Diff line change
Expand Up @@ -221,6 +221,10 @@ let Model = {
if (!init.id) {
init.id = (0, uuid_1.v4)();
}
if (!init.modifiers)
init.modifiers = [];
if (init.visible === undefined)
init.visible = true;
if (!init.concept) {
init.concept = "origin";
}
Expand Down
3 changes: 3 additions & 0 deletions models/Dish.ts
Original file line number Diff line number Diff line change
Expand Up @@ -294,6 +294,9 @@ let Model = {
init.id = uuid();
}

if(!init.modifiers) init.modifiers = []
if(init.visible === undefined) init.visible = true;

if (!init.concept) {
init.concept = "origin"
}
Expand Down

0 comments on commit 012284a

Please sign in to comment.