From 8a85055264b1e487f535caa08effc4026ebea13c Mon Sep 17 00:00:00 2001 From: Skylar Ittner Date: Sat, 30 Mar 2019 01:38:21 -0600 Subject: [PATCH] Fix undefined function errors, improve spacing of buttons --- www/js/platform.js | 16 ++++++++++++---- www/pages/sendmoney.html | 4 ++-- 2 files changed, 14 insertions(+), 6 deletions(-) diff --git a/www/js/platform.js b/www/js/platform.js index 5efc5b4..f32f6bb 100644 --- a/www/js/platform.js +++ b/www/js/platform.js @@ -19,14 +19,18 @@ var getLocation = function (success, error) { navigator.geolocation.getCurrentPosition(function (position) { success(position); }, function (err) { - error(err.message); + if (typeof error == "function") { + error(err.message); + } }, { enableHighAccuracy: true, timeout: 5000, maximumAge: 0 }); } else { - error("Location is unavailable."); + if (typeof error == "function") { + error("Location is unavailable."); + } } } @@ -35,14 +39,18 @@ var watchLocation = function (success, error) { navigator.geolocation.watchPosition(function (position) { success(position); }, function (err) { - error(err.message); + if (typeof error == "function") { + error(err.message); + } }, { enableHighAccuracy: true, timeout: 5000, maximumAge: 0 }); } else { - error("Location is unavailable."); + if (typeof error == "function") { + error("Location is unavailable."); + } } } diff --git a/www/pages/sendmoney.html b/www/pages/sendmoney.html index d663679..5929735 100644 --- a/www/pages/sendmoney.html +++ b/www/pages/sendmoney.html @@ -24,13 +24,13 @@