Get function name

pull/6075/head
iLTeoooD 6 years ago
parent ed6cfe2376
commit df1b498051

@ -401,13 +401,8 @@ export default class Expression {
}
function get_function_name(_node, parent) {
if (parent.type === 'EventHandler') {
return `${parent.name}_handler`;
}
if (parent.type === 'Action') {
return `${parent.name}_function`;
}
return 'func';
return {
'EventHandler': `${parent.name}_handler`,
'Action': `${parent.name}_function`
}[parent.type] || 'func';
}

Loading…
Cancel
Save