Skip to content

Commit b18324f

Browse files
Fix for Useless conditional
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
1 parent dda1af8 commit b18324f

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

feedback.js

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -787,7 +787,14 @@
787787

788788
// wire close buttons to animate down first
789789
const closeBtn = popup.querySelector('.survey-close');
790-
if (closeBtn) closeBtn.onclick = () => showCloseSurveyWarning(popup) || animateCloseAndRemove();
790+
if (closeBtn) {
791+
closeBtn.onclick = () => {
792+
const shouldClose = showCloseSurveyWarning(popup);
793+
if (shouldClose !== false) {
794+
animateCloseAndRemove();
795+
}
796+
};
797+
}
791798

792799
if (laterBtn) laterBtn.onclick = () => animateCloseAndRemove();
793800

0 commit comments

Comments
 (0)