fix(browser-extension): duplicating report dialog

This commit is contained in:
wanhose 2023-01-13 11:34:26 +01:00
parent cdb33acf81
commit 6f799206af

View File

@ -216,12 +216,14 @@ const submitButtonClickHandler = (event) => {
*/
chrome.runtime.onMessage.addListener((message) => {
const isPage = window === window.top;
switch (message.type) {
case 'HIDE_REPORT_DIALOG':
hideReportDialog();
if (isPage) hideReportDialog();
break;
case 'SHOW_REPORT_DIALOG':
showReportDialog();
if (isPage) showReportDialog();
break;
default:
break;