From 7732cfce82edb4e0defd3623523a12577728cb65 Mon Sep 17 00:00:00 2001 From: Adrian Schmidt Date: Fri, 5 May 2023 12:58:23 +0200 Subject: [PATCH] fix: do not throw error when parent of nested field is missing Instead of erroring when the parent of a nexted field is missing, just return the empty value. --- index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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) {