From 1b2cfa5f05d3576612e7bf1e7c72b9d7d9c38163 Mon Sep 17 00:00:00 2001 From: Michael Telatynski <7t3chguy@gmail.com> Date: Thu, 17 Dec 2020 10:34:49 +0000 Subject: [PATCH] Social Login support both https and mxc icons --- src/components/views/elements/SSOButtons.tsx | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) 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", {