summaryrefslogtreecommitdiffstats
path: root/dist/js
diff options
context:
space:
mode:
authorsijanec <sijanecantonluka@gmail.com>2020-05-20 17:28:19 +0200
committersijanec <sijanecantonluka@gmail.com>2020-05-20 17:28:19 +0200
commit5de19af5e33c527e4b47091b5eba010f002b73eb (patch)
tree0f5cd42ca465f53513b2bcb0fb9ee28ab7456379 /dist/js
parentreplaced more geeky operators (diff)
downloadbeziapp-5de19af5e33c527e4b47091b5eba010f002b73eb.tar
beziapp-5de19af5e33c527e4b47091b5eba010f002b73eb.tar.gz
beziapp-5de19af5e33c527e4b47091b5eba010f002b73eb.tar.bz2
beziapp-5de19af5e33c527e4b47091b5eba010f002b73eb.tar.lz
beziapp-5de19af5e33c527e4b47091b5eba010f002b73eb.tar.xz
beziapp-5de19af5e33c527e4b47091b5eba010f002b73eb.tar.zst
beziapp-5de19af5e33c527e4b47091b5eba010f002b73eb.zip
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) {