Skip to content

Commit

Permalink
fix: openfoodfacts#2374 null check error creating product (openfoodfa…
Browse files Browse the repository at this point in the history
  • Loading branch information
cli1005 authored Jun 28, 2022
1 parent c1664d6 commit fb44845
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -100,8 +100,10 @@ class _AddNewProductPageState extends State<AddNewProductPage> {
// "other photos" uploaded by the user.
if (imageType == ImageField.OTHER) {
rows.add(_buildAddImageButton(context, imageType));
for (final File image in _uploadedImages[imageType]!) {
rows.add(_buildImageUploadedRow(context, imageType, image));
if (_uploadedImages[imageType] != null) {
for (final File image in _uploadedImages[imageType]!) {
rows.add(_buildImageUploadedRow(context, imageType, image));
}
}
continue;
}
Expand Down

0 comments on commit fb44845

Please sign in to comment.