Skip to content

Commit

Permalink
Merge pull request #22849 from colemanw/fixApiExplorerError
Browse files Browse the repository at this point in the history
Fix API4 Explorer undefined variable error
  • Loading branch information
seamuslee001 authored Feb 28, 2022
2 parents 4c79f03 + c0a7504 commit 7abc056
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 @@ -688,13 +688,13 @@
var code = {},
entity = $scope.entity,
action = $scope.action,
args = getEntity(entity).class_args || [],
params = getParams(),
index = isInt($scope.index) ? +$scope.index : parseYaml($scope.index),
result = 'result';
if ($scope.entity && $scope.action) {
delete params.debug;
if (action.slice(0, 3) === 'get') {
var args = getEntity(entity).class_args || [];
result = args[0] ? _.camelCase(args[0]) : entity;
result = lcfirst(action.replace(/s$/, '').slice(3) || result);
}
Expand Down

0 comments on commit 7abc056

Please sign in to comment.