From d236b517fe2ac401723a345529e8dcfb97c241c5 Mon Sep 17 00:00:00 2001 From: Jonas Jenwald Date: Sat, 7 Mar 2026 11:22:21 +0100 Subject: [PATCH] Shorten the `createActionsMap` helper in the `src/scripting_api/common.js` file --- src/scripting_api/common.js | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/src/scripting_api/common.js b/src/scripting_api/common.js index 64d8edf55..aa1b4c054 100644 --- a/src/scripting_api/common.js +++ b/src/scripting_api/common.js @@ -22,13 +22,7 @@ const FieldType = { }; function createActionsMap(actions) { - const actionsMap = new Map(); - if (actions) { - for (const [eventType, actionsForEvent] of Object.entries(actions)) { - actionsMap.set(eventType, actionsForEvent); - } - } - return actionsMap; + return new Map(actions ? Object.entries(actions) : null); } function getFieldType(actions) {