From 3495fe676d93f71ea41054f192af1e9e7f65a142 Mon Sep 17 00:00:00 2001 From: Coleman Watts Date: Fri, 11 Sep 2020 14:18:11 -0400 Subject: [PATCH] APIv4 Explorer: Only show result length if result is array --- ang/api4Explorer/Explorer.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ang/api4Explorer/Explorer.js b/ang/api4Explorer/Explorer.js index 41750691c6..7c64b6e667 100644 --- a/ang/api4Explorer/Explorer.js +++ b/ang/api4Explorer/Explorer.js @@ -791,7 +791,7 @@ $scope.debug = debugFormat(resp.data); $scope.result = [ formatMeta(resp.data), - prettyPrintOne('(' + resp.data.values.length + ') ' + _.escape(JSON.stringify(resp.data.values, null, 2)), 'js', 1) + prettyPrintOne((_.isArray(resp.data.values) ? '(' + resp.data.values.length + ') ' : '') + _.escape(JSON.stringify(resp.data.values, null, 2)), 'js', 1) ]; }, function(resp) { $scope.loading = false; -- 2.25.1