Skip to content

Commit

Permalink
chagnes
Browse files Browse the repository at this point in the history
  • Loading branch information
aliabid94 committed Jul 5, 2023
1 parent f9d85ff commit e68d082
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions js/app/src/Blocks.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -371,7 +371,7 @@
const is_external_url = (link: string | null) =>
link && new URL(link, location.href).origin !== location.origin;
let attached_error_listeners = false;
let attached_error_listeners: number[] = [];
async function handle_mount() {
await tick();
Expand Down Expand Up @@ -418,19 +418,19 @@
handled_dependencies[i].push(id);
});
});
if (!attached_error_listeners) {
attached_error_listeners = true;
components.forEach((c) => {
components.forEach((c) => {
if (!attached_error_listeners.includes(c.id)) {
if (c.instance) {
attached_error_listeners.push(c.id);
c.instance.$on("error", (event_data: any) => {
messages = [
new_message(event_data.detail, -1, "error"),
...messages
];
});
}
});
}
}
});
}
function handle_destroy(id: number) {
Expand Down

0 comments on commit e68d082

Please sign in to comment.