Skip to content

Commit 5b6ac6e

Browse files
sameeragCopilot
andauthored
Potential fix for pull request finding
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
1 parent 3b53059 commit 5b6ac6e

1 file changed

Lines changed: 12 additions & 1 deletion

File tree

lib/msal-browser/src/interaction_client/PopupClient.ts

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -927,7 +927,18 @@ export class PopupClient extends StandardInteractionClient {
927927
try {
928928
popupWindow.document.title = "Microsoft Authentication";
929929
} catch (e) {
930-
// Cross-origin - title cannot be set
930+
if (
931+
typeof DOMException !== "undefined" &&
932+
e instanceof DOMException &&
933+
e.name === "SecurityError"
934+
) {
935+
// Cross-origin - title cannot be set
936+
} else {
937+
this.logger.verbose(
938+
"Could not set document.title on popup window",
939+
this.correlationId
940+
);
941+
}
931942
}
932943
if (popupWindow.focus) {
933944
popupWindow.focus();

0 commit comments

Comments
 (0)