Skip to content

Commit 3aa6371

Browse files
error solved
1 parent 48794c3 commit 3aa6371

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

swiggy(LTS)/src/component/DishCard.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ const DishCard = ({name, price, rating, description, imageUrl , isVeg}) =>{
55
let descriptionFlag = false;
66
let shownDescription = description;
77

8-
if(description.split(" ").length > 30){
8+
if(description?.split(" ").length > 30){
99
shownDescription = description?.split(" ")?.splice(0,30)?.join(" ");
1010
descriptionFlag = true;
1111
}

0 commit comments

Comments
 (0)