From 2cee4109db94bf69cab128d46204ac0a2f066214 Mon Sep 17 00:00:00 2001 From: jfoclpf Date: Sat, 10 Jun 2023 21:01:33 +0100 Subject: [PATCH] bug solved --- www/js/main.js | 2 +- www/js/photos.js | 10 ++++++---- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/www/js/main.js b/www/js/main.js index 62c78bc..af26967 100755 --- a/www/js/main.js +++ b/www/js/main.js @@ -2,7 +2,7 @@ /* global $, cordova, device */ -let DEBUG = true +let DEBUG = false const app = {} diff --git a/www/js/photos.js b/www/js/photos.js index acbe0cf..6cec5b3 100755 --- a/www/js/photos.js +++ b/www/js/photos.js @@ -211,7 +211,9 @@ app.photos = (function (thisModule) { console.log('photosAsBase64: ', photosAsBase64) for (let i = 0; i < photosAsBase64.length; i++) { - app.form.displayImage(photosAsBase64[i], i + 1) + if (photosAsBase64[i]) { + app.form.displayImage(photosAsBase64[i], i + 1) + } } const imgNmbr = parseInt(window.localStorage.getItem('userCapturingPhotoNumber')) || 1 @@ -410,9 +412,9 @@ app.photos = (function (thisModule) { } function removeImage (num) { - photosUriOnFileSystem[num - 1] = null - photosAsBase64[num - 1] = null - photoWithGPS[num - 1] = null + photosUriOnFileSystem[num - 1] = '' + photosAsBase64[num - 1] = '' + photoWithGPS[num - 1] = '' storePhotosArrays('ALL') }