summaryrefslogtreecommitdiff
path: root/www/js/app.js
diff options
context:
space:
mode:
authorPliable Pixels <pliablepixels@gmail.com>2018-10-21 10:33:47 -0400
committerPliable Pixels <pliablepixels@gmail.com>2018-10-21 10:33:47 -0400
commit3f549f3d6ea3dac1fbf862e236549ce0dd7fd570 (patch)
tree9f0f4f022a813a658d294b598f901b2bd6be8193 /www/js/app.js
parent8e34a5c7d2e5969d72a2a469e8c97ad7fc7de712 (diff)
#724 more cleanup
Diffstat (limited to 'www/js/app.js')
-rwxr-xr-xwww/js/app.js4
1 files changed, 2 insertions, 2 deletions
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("<pre class=\"cake-error\">") != -1) {
+ if (response.data && typeof(response.data) == 'string' && response.data.startsWith("<pre class=\"cake-error\">")) {
console.log ("cake error detected, attempting fix...");
response.data = JSON.parse(response.data.replace(/<pre class=\"cake-error\">[\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("<pre class=\"cake-error\">") != -1) {
+ if (succ.data.startsWith("<pre class=\"cake-error\">") ) {
logger.debug ("**** Native: cake-error in message, trying fix...");
succ.data = JSON.parse(succ.data.replace(/<pre class=\"cake-error\">[\s\S]*<\/pre>/,''));
}