diff --git a/js/records/FoodItemRecord.js b/js/records/FoodItemRecord.js index d5c2658..2f733d7 100644 --- a/js/records/FoodItemRecord.js +++ b/js/records/FoodItemRecord.js @@ -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,