bug: fix negative dimension

This commit is contained in:
dscyrescotti
2024-07-19 18:51:05 +07:00
parent 8221235726
commit b204a6c54a

View File

@@ -36,7 +36,7 @@ struct MemoPreview: View {
.fill(.white)
}
}
.frame(width: cellWidth, height: cellHeight)
.frame(width: max(.zero, cellWidth), height: max(.zero, cellHeight))
.background(.white)
.clipShape(RoundedRectangle(cornerRadius: 10))
}