Skip to content

Commit

Permalink
APIv4 Explorer: Only show result length if result is array
Browse files Browse the repository at this point in the history
  • Loading branch information
colemanw committed Sep 14, 2020
1 parent 4cb2779 commit 3495fe6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ang/api4Explorer/Explorer.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 3495fe6

Please sign in to comment.