Skip to content

Commit 03c4c5e

Browse files
authored
Merge pull request #2439 from cpmsmith/window-open-noopener
fix: open external links in default browser from macOS PWA
2 parents 2545a6a + d426b47 commit 03c4c5e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

assets/javascripts/lib/util.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -457,13 +457,13 @@ $.noop = function () {};
457457

458458
$.popup = function (value) {
459459
try {
460+
window.open(value.href || value, "_blank", "noopener");
461+
} catch (error) {
460462
const win = window.open();
461463
if (win.opener) {
462464
win.opener = null;
463465
}
464466
win.location = value.href || value;
465-
} catch (error) {
466-
window.open(value.href || value, "_blank");
467467
}
468468
};
469469

0 commit comments

Comments
 (0)