Skip to content

Commit

Permalink
fix(smart-component): protect from abortController nullity when smart…
Browse files Browse the repository at this point in the history
… component is disconnected

Fixes #968
  • Loading branch information
pdesoyres-cc authored and florian-sanders-cc committed Mar 7, 2024
1 parent f0ffa8b commit c714dcd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/lib/define-smart-component.js
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ export function defineSmartComponent (definition, signal) {
definition.onContextUpdate({ container, component, context, onEvent, updateComponent, signal });
},
onDisconnect (container, component) {
component[META].get(definition).abortController.abort();
component[META].get(definition).abortController?.abort();
component[META].delete(definition);
},
});
Expand Down

0 comments on commit c714dcd

Please sign in to comment.