Skip to content

Commit 5fd9bff

Browse files
committed
fix: bootstrap dialog hooks now return properly
1 parent de85ecf commit 5fd9bff

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

src/hooks/BootstrapDialog.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,12 @@ import wrap from '../utils/2.pokemon.js';
44
function setter(key, args) {
55
const original = args[`on${key}`];
66
function wrapper(dialog) {
7+
let ret;
78
if (typeof original === 'function') {
8-
wrap(() => original(dialog), `BootstrapDialog:on${key}`);
9+
ret = wrap(() => original(dialog), `BootstrapDialog:on${key}`);
910
}
1011
eventManager.emit(`BootstrapDialog:${key}`, dialog);
12+
return ret;
1113
}
1214
return wrapper;
1315
}

0 commit comments

Comments
 (0)