From 3f549f3d6ea3dac1fbf862e236549ce0dd7fd570 Mon Sep 17 00:00:00 2001 From: Pliable Pixels Date: Sun, 21 Oct 2018 10:33:47 -0400 Subject: #724 more cleanup --- www/js/app.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'www/js/app.js') diff --git a/www/js/app.js b/www/js/app.js index 4e146384..8bbe4d1b 100755 --- a/www/js/app.js +++ b/www/js/app.js @@ -716,7 +716,7 @@ angular.module('zmApp', [ //console.log ("HTTP response"); - if (response.data && typeof(response.data) == 'string' && response.data.indexOf("
") != -1) {
+        if (response.data && typeof(response.data) == 'string' && response.data.startsWith("
")) {
             console.log ("cake error detected, attempting fix...");
             response.data = JSON.parse(response.data.replace(/
[\s\S]*<\/pre>/,''));
             //console.log ("FIXED="+response.data);
@@ -2350,7 +2350,7 @@ angular.module('zmApp', [
               } else {
 
                 // work around for cake-error leak
-                if (succ.data.indexOf("
") != -1) {
+                if (succ.data.startsWith("
") ) {
                   logger.debug ("**** Native: cake-error in message, trying fix...");
                   succ.data = JSON.parse(succ.data.replace(/
[\s\S]*<\/pre>/,''));
                 }
-- 
cgit v1.2.3