Shorten the createActionsMap helper in the src/scripting_api/common.js file

This commit is contained in:
Jonas Jenwald 2026-03-07 11:22:21 +01:00
parent d9b81b5199
commit d236b517fe

View File

@ -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) {