Merge pull request #20820 from Snuffleupagus/createActionsMap-shorten

Shorten the `createActionsMap` helper in the `src/scripting_api/common.js` file
This commit is contained in:
Tim van der Meij 2026-03-07 13:09:16 +01:00 committed by GitHub
commit a3a13f6041
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -22,13 +22,7 @@ const FieldType = {
}; };
function createActionsMap(actions) { function createActionsMap(actions) {
const actionsMap = new Map(); return new Map(actions ? Object.entries(actions) : null);
if (actions) {
for (const [eventType, actionsForEvent] of Object.entries(actions)) {
actionsMap.set(eventType, actionsForEvent);
}
}
return actionsMap;
} }
function getFieldType(actions) { function getFieldType(actions) {