Fix leaving a group

There's still an issue because the call is made twice, but at least it
works

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
Thomas Citharel
2022-10-26 18:45:47 +02:00
parent 688bdccc24
commit 2454fe2aa4
3 changed files with 25 additions and 10 deletions

View File

@@ -137,7 +137,9 @@ const close = () => {
*/
const cancel = (source: string) => {
emit("cancel", source);
props.onCancel?.apply(null, [source]);
if (props?.onCancel) {
props?.onCancel(source);
}
close();
};
</script>