Skip to content

Commit

Permalink
Pass the false flag for takeOwnership
Browse files Browse the repository at this point in the history
- Based on latest review cleanup
  • Loading branch information
mofojed committed Dec 12, 2023
1 parent 1cc914c commit 638f4d1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion plugins/ui/src/js/src/WidgetHandler.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ function WidgetHandler({ onClose, widget: wrapper }: WidgetHandlerProps) {
log.debug('loadWidget', wrapper.id, wrapper.definition);
let isCancelled = false;
async function loadWidgetInternal() {
const newWidget = await wrapper.fetch();
const newWidget = await wrapper.fetch(false);
if (isCancelled) {
newWidget.close();
return;
Expand Down
2 changes: 1 addition & 1 deletion plugins/ui/src/js/src/WidgetTypes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export interface WidgetMessageDetails {

export type WidgetMessageEvent = CustomEvent<WidgetMessageDetails>;

export type WidgetFetch = () => Promise<Widget>;
export type WidgetFetch = (takeOwnership?: boolean) => Promise<Widget>;

export type WidgetWrapper = {
definition: WidgetDefinition;
Expand Down

0 comments on commit 638f4d1

Please sign in to comment.