projects
/
civicrm-core.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4cb2779
)
APIv4 Explorer: Only show result length if result is array
author
Coleman Watts
<coleman@civicrm.org>
Fri, 11 Sep 2020 18:18:11 +0000
(14:18 -0400)
committer
Coleman Watts
<coleman@civicrm.org>
Mon, 14 Sep 2020 19:08:36 +0000
(15:08 -0400)
ang/api4Explorer/Explorer.js
patch
|
blob
|
blame
|
history
diff --git
a/ang/api4Explorer/Explorer.js
b/ang/api4Explorer/Explorer.js
index 41750691c61c750370d9a06e2caa3b461a386f6f..7c64b6e6671c9d1e39d974db47e59bce121fed48 100644
(file)
--- 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;