Skip to content

Commit

Permalink
Merge pull request #363 from sean-goodlab/bug/fix-tfToCdktfProp-doubl…
Browse files Browse the repository at this point in the history
…e-underscore

Adds ternary to truthy check each split segment.
  • Loading branch information
iann0036 committed Mar 20, 2024
2 parents 885f8de + 87dd892 commit c5fb801
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion js/mappings.js
Original file line number Diff line number Diff line change
Expand Up @@ -2167,7 +2167,7 @@ function tfToCdktfProp(str) {
}

var split = str.split("_");
var ret = split.map(x => x[0].toUpperCase() + x.substr(1)).join('');
var ret = split.map(x => x[0] ? x[0].toUpperCase() : '' + x.substr(1)).join('');
ret = ret[0].toLowerCase() + ret.substr(1);

return ret;
Expand Down

0 comments on commit c5fb801

Please sign in to comment.