Skip to content

Commit

Permalink
Explorer.js - Slightly nicer variable name
Browse files Browse the repository at this point in the history
Ex: Create a custom group `Education`. It has entity name `Custom_Education`.

Before: Suggested variable is `$custom_Education = \Civi\Api4\Custom::get('Education')`

After: Suggested variable is `$customEducation = \Civi\Api4\Custom::get('Education')`
  • Loading branch information
totten committed Feb 26, 2022
1 parent 379016b commit ecff36f
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 @@ -697,7 +697,7 @@
if (action.slice(0, 3) === 'get') {
result = lcfirst(action.replace(/s$/, '').slice(3) || entity);
}
var results = lcfirst(_.isNumber(index) ? result : pluralize(result)),
var results = _.camelCase(_.isNumber(index) ? result : pluralize(result)),
paramCount = _.size(params),
i = 0;

Expand Down

0 comments on commit ecff36f

Please sign in to comment.