mirror of
https://github.com/mozilla/pdf.js.git
synced 2026-04-09 23:04:02 +02:00
Shorten the createActionsMap helper in the src/scripting_api/common.js file
This commit is contained in:
parent
d9b81b5199
commit
d236b517fe
@ -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) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user