diff --git a/frontend/src/components/common/event-bus.js b/frontend/src/components/common/event-bus.js index ceb58b75b52..6487d1cfe8f 100644 --- a/frontend/src/components/common/event-bus.js +++ b/frontend/src/components/common/event-bus.js @@ -25,4 +25,8 @@ class EventBus { } } +const eventBus = new EventBus(); + export default EventBus; + +export { eventBus }; diff --git a/frontend/src/components/search/wiki2-search-result.js b/frontend/src/components/search/wiki2-search-result.js index cb244ec9cfc..57fb76d5d8b 100644 --- a/frontend/src/components/search/wiki2-search-result.js +++ b/frontend/src/components/search/wiki2-search-result.js @@ -7,8 +7,9 @@ import { gettext } from '../../utils/constants'; import './wiki2-search-result.css'; -function Wiki2SearchResult({ result, currentPageId, setCurrentPage, resetToDefault, setRef, isHighlight }) { +function Wiki2SearchResult({ result, getCurrentPageId, setCurrentPage, resetToDefault, setRef, isHighlight }) { const { content, page } = result; + const currentPageId = getCurrentPageId(); const isCurrentPage = currentPageId === page.id; return (