From 3f31b88c232961ed447e90e74131b2a829ff5b00 Mon Sep 17 00:00:00 2001 From: Rhilip Date: Fri, 19 Jul 2019 18:21:03 +0800 Subject: [PATCH] fix(js/debug): Fix may fail to parse sql debug data --- apps/public/static/js/main.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/public/static/js/main.js b/apps/public/static/js/main.js index ab02cb4..f97d0ff 100644 --- a/apps/public/static/js/main.js +++ b/apps/public/static/js/main.js @@ -267,7 +267,7 @@ jQuery(document).ready(function () { size: 'lg', custom: function () { let ret = ''; - let parsed_sql_data = JSON.parse(_sql_data || '[]'); + let parsed_sql_data = JSON.parse(_sql_data.replace(/\n/g,' ').replace(/ {2,}/g,' ') || '[]'); let parsed_redis_data = JSON.parse(_redis_data || '{}'); ret += 'SQL query list: