Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions packages/renderless/src/modal/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ export const handleEvent =
params.options = options
}

type !== 'close' && emit(type, params, event)
emit(type, params, event)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ensure that removing the condition for emitting 'close' does not lead to unintended side effects, such as triggering the 'close' event in scenarios where it should not be triggered.

events[type] && events[type].call(parent, params)
api.close(type)
}
Expand Down Expand Up @@ -374,7 +374,6 @@ export const close =
setTimeout(() => {
state.visible = false
let params = { type, $modal: parent }
emit('close', params)
if (events.hide) {
events.hide.call(parent, params)
} else {
Expand Down
Loading