Skip to content

Commit

Permalink
fix: do not throw error when parent of nested field is missing
Browse files Browse the repository at this point in the history
Instead of erroring when the parent of a nexted field is missing, just
return the empty value.
  • Loading branch information
adrianschmidt committed May 5, 2023
1 parent 9062fbe commit af6b4d3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ try {
var parsed = toml.parse(str);
var value = parsed;
fields.forEach(function (f) {
value = value[f];
value = value?.[f];
});
core.setOutput("value", value);
} catch (error) {
Expand Down

0 comments on commit af6b4d3

Please sign in to comment.