From 7972485509ae89bdd80f6d15eb7927c77154be09 Mon Sep 17 00:00:00 2001 From: Henry Castro Date: Fri, 6 Aug 2021 15:37:21 -0400 Subject: [PATCH] loleaflet: simplify logException Change-Id: I31bc41ba519f3bd5e5b873a836f6c8ed5bd842d5 Signed-off-by: Henry Castro --- loleaflet/js/global.js | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/loleaflet/js/global.js b/loleaflet/js/global.js index d3d096c9f..340799547 100644 --- a/loleaflet/js/global.js +++ b/loleaflet/js/global.js @@ -66,11 +66,9 @@ window.app = { // Shouldn't have any functions defined. // except in tile debug mode (Ctrl-Shift-Alt-d) console.log2 = console.log; console.logException = function (err) { + var log = 'jsexception ' + JSON.stringify(err, null, 2) + '\n'; console.log2(err); - setTimeout(function() { - var log = 'jsexception ' + JSON.stringify(err, null, 2) + '\n'; - global.logServer(log); - }, 0); + global.logServer(log); }; if (global.loleafletLogging !== 'true') {