summaryrefslogtreecommitdiffstats
path: root/dist/js
diff options
context:
space:
mode:
Diffstat (limited to 'dist/js')
-rwxr-xr-xdist/js/app.js2
-rw-r--r--dist/js/messaging.js21
2 files changed, 13 insertions, 10 deletions
diff --git a/dist/js/app.js b/dist/js/app.js
index 07197bb..d9a5e16 100755
--- a/dist/js/app.js
+++ b/dist/js/app.js
@@ -3,7 +3,7 @@
const app_version = "1.0.13-beta";
-const previous_commit = "f4aa5ca7f0ee77f5b26ff3f9d1b5c9f25cd1d2cb";
+const previous_commit = "2eaa58fd631705101eeb6a946f548f936747c30e";
if ("serviceWorker" in navigator) {
navigator.serviceWorker.register("/sw.js")
diff --git a/dist/js/messaging.js b/dist/js/messaging.js
index f829cd5..34963a3 100644
--- a/dist/js/messaging.js
+++ b/dist/js/messaging.js
@@ -375,15 +375,18 @@ function displayData(messageType) {
// -1 = cumulative
function getNumMessages(messageType = -1) {
- if (messageType === -1) {
- let sum = 0;
- for (const [messageType, messageList] of Object.entries(messages)) {
- sum += messageList.length;
- }
- return sum;
- } else {
- return (messages[messageType].length ?? 0);
- }
+ if (messageType === -1) {
+ let sum = 0;
+ for (const [messageType, messageList] of Object.entries(messages)) {
+ sum += messageList.length;
+ }
+ return sum;
+ } else {
+ var what_to_return = messages[messageType].length;
+ if(what_to_return == null)
+ return 0
+ return what_to_return;
+ }
}
async function sendMessage(recipient_number, subject, body) {