1
0
mirror of https://github.com/vrana/adminer.git synced 2025-08-25 23:36:20 +02:00

Use JSON.parse if available

This commit is contained in:
Jakub Vrana
2018-01-09 18:16:02 +01:00
parent e614ae08c4
commit 3408d4ad78
2 changed files with 2 additions and 2 deletions

View File

@@ -565,7 +565,7 @@ function ajax(url, callback, data, message) {
*/
function ajaxSetHtml(url) {
return ajax(url, function (request) {
var data = eval('(' + request.responseText + ')');
var data = window.JSON ? JSON.parse(request.responseText) : eval('(' + request.responseText + ')');
for (var key in data) {
setHtml(key, data[key]);
}