bug: fix negative dimension

This commit is contained in:
dscyrescotti
2024-07-19 18:51:05 +07:00
parent 8221235726
commit b204a6c54a
@@ -36,7 +36,7 @@ struct MemoPreview: View {
.fill(.white) .fill(.white)
} }
} }
.frame(width: cellWidth, height: cellHeight) .frame(width: max(.zero, cellWidth), height: max(.zero, cellHeight))
.background(.white) .background(.white)
.clipShape(RoundedRectangle(cornerRadius: 10)) .clipShape(RoundedRectangle(cornerRadius: 10))
} }