Skip to content

Commit

Permalink
chore(feel-popup): make eventBus really optional
Browse files Browse the repository at this point in the history
  • Loading branch information
Niklas Kiefer committed Sep 22, 2023
1 parent 68fb4ba commit 3ce7285
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions src/components/entries/FEEL/FeelPopup.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ export const FEEL_POPUP_HEIGHT = 250;
export default function FEELPopupRoot(props) {
const {
element,
eventBus,
eventBus = { fire() {}, on() {}, off() {} },
popupContainer
} = props;

Expand Down Expand Up @@ -74,10 +74,6 @@ export default function FEELPopupRoot(props) {
// allow close and open via events
useEffect(() => {

if (!eventBus) {
return;
}

const handlePopupOpen = (context) => {
const {
entryId,
Expand All @@ -97,10 +93,6 @@ export default function FEELPopupRoot(props) {
eventBus.on('feelPopup._isOpen', handleIsOpen);

return () => {
if (!eventBus) {
return;
}

eventBus.off('feelPopup._close', handleClose);
eventBus.off('feelPopup._open', handleOpen);
eventBus.off('feelPopup._isOpen', handleIsOpen);
Expand Down

0 comments on commit 3ce7285

Please sign in to comment.