diff --git a/index.js b/index.js index 7da95e4..0bdca71 100644 --- a/index.js +++ b/index.js @@ -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) {