mirror of
https://gitlab.com/wheres-the-tp/ui-mobile.git
synced 2026-01-25 07:54:57 -06:00
minor code consolidation
This commit is contained in:
parent
47cf666f34
commit
6bb2dfd99b
1 changed files with 1 additions and 4 deletions
|
|
@ -38,10 +38,7 @@ const FoodRecordDefaults: FoodItem = {
|
|||
const FoodItemRecord = Record(FoodRecordDefaults, 'FoodItemRecord');
|
||||
|
||||
export const createFoodItem = (foodItemRaw: ?RawFoodItem) => {
|
||||
if (!foodItemRaw) {
|
||||
return foodItemRaw;
|
||||
}
|
||||
return new FoodItemRecord({
|
||||
return !foodItemRaw ? foodItemRaw : new FoodItemRecord({
|
||||
...foodItemRaw,
|
||||
placeId: foodItemRaw.placeid,
|
||||
thumbImage: foodItemRaw.thumbimage,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue