fix(browser-extension): duplicating report dialog
This commit is contained in:
parent
cdb33acf81
commit
6f799206af
@ -216,12 +216,14 @@ const submitButtonClickHandler = (event) => {
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
chrome.runtime.onMessage.addListener((message) => {
|
chrome.runtime.onMessage.addListener((message) => {
|
||||||
|
const isPage = window === window.top;
|
||||||
|
|
||||||
switch (message.type) {
|
switch (message.type) {
|
||||||
case 'HIDE_REPORT_DIALOG':
|
case 'HIDE_REPORT_DIALOG':
|
||||||
hideReportDialog();
|
if (isPage) hideReportDialog();
|
||||||
break;
|
break;
|
||||||
case 'SHOW_REPORT_DIALOG':
|
case 'SHOW_REPORT_DIALOG':
|
||||||
showReportDialog();
|
if (isPage) showReportDialog();
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
|
Loading…
Reference in New Issue
Block a user