diff options
Diffstat (limited to 'app/assets/javascripts/webhooks/index.js')
-rw-r--r-- | app/assets/javascripts/webhooks/index.js | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/app/assets/javascripts/webhooks/index.js b/app/assets/javascripts/webhooks/index.js index 1b2b33e44c1..d90680a9bac 100644 --- a/app/assets/javascripts/webhooks/index.js +++ b/app/assets/javascripts/webhooks/index.js @@ -10,6 +10,11 @@ export default () => { const { url: initialUrl, urlVariables } = el.dataset; + // Convert the array of 'key' strings to array of { key } objects + const initialUrlVariables = urlVariables + ? JSON.parse(urlVariables)?.map((key) => ({ key })) + : undefined; + return new Vue({ el, name: 'WebhookFormRoot', @@ -17,7 +22,7 @@ export default () => { return createElement(FormUrlApp, { props: { initialUrl, - initialUrlVariables: urlVariables ? JSON.parse(urlVariables) : undefined, + initialUrlVariables, }, }); }, |