Skip to content

Commit 786a94a

Browse files
committed
fix(component): [modal] repeatedly dispatch the close event
1 parent d3fcc60 commit 786a94a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/renderless/src/modal/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,7 @@ export const handleEvent =
207207
params.options = options
208208
}
209209

210-
emit(type, params, event)
210+
type !== 'close' && emit(type, params, event)
211211
events[type] && events[type].call(parent, params)
212212
api.close(type)
213213
}

0 commit comments

Comments
 (0)