summaryrefslogtreecommitdiff
path: root/www/js/app.js
diff options
context:
space:
mode:
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>/,''));
}