Skip to content

Commit

Permalink
fix: add fire storage event (#84)
Browse files Browse the repository at this point in the history
  • Loading branch information
Marginy605 authored Sep 21, 2023
1 parent 17a54f8 commit 130395a
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/components/OverlayControls/OverlayControls.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -315,6 +315,8 @@ class OverlayControls extends React.Component<OverlayControlsProps> {
};

localStorage.setItem(COPIED_WIDGET_STORE_KEY, JSON.stringify(options));
// https://stackoverflow.com/questions/35865481/storage-event-not-firing
window.dispatchEvent(new Event('storage'));
};
private onEditItem = () => {
this.context.editItem(this.props.configItem);
Expand Down

0 comments on commit 130395a

Please sign in to comment.