diff --git a/src/components/views/elements/SSOButtons.tsx b/src/components/views/elements/SSOButtons.tsx index 57dd31f9d6..89356ecf5c 100644 --- a/src/components/views/elements/SSOButtons.tsx +++ b/src/components/views/elements/SSOButtons.tsx @@ -45,8 +45,13 @@ const SSOButton: React.FC = ({ }; let icon; - if (idp && idp.icon && idp.icon.startsWith("https://")) { - icon = {label}; + if (typeof idp?.icon === "string" && idp.icon.startsWith("mxc://") || idp.icon.startsWith("https://")) { + icon = {label}; } const classes = classNames("mx_SSOButton", {