Skip to content

Commit 7f9cf9c

Browse files
committed
feat: actions containg '.' will as name and method
1 parent 51e5582 commit 7f9cf9c

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/index.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,13 @@ function runAction(stagedActions, index, element) {
7272
const currentAction = stagedActions[index];
7373
if (!currentAction) return
7474

75-
const actionName = currentAction.name
75+
let actionName = currentAction.name
76+
if (actionName.includes('.')) {
77+
let name = actionName.split('.')[0]
78+
currentAction.method = actionName.substring(name.length + 1)
79+
currentAction.name = actionName = name
80+
}
81+
7682
const action = actions[actionName];
7783

7884
if (action) {

0 commit comments

Comments
 (0)