From 063e6e3e9c85713764224f92708f9d04ba49a3c1 Mon Sep 17 00:00:00 2001 From: "J. Ryan Stinnett" Date: Fri, 10 Jul 2020 18:23:27 +0100 Subject: [PATCH] Fix a few types --- src/RebrandListener.tsx | 4 ++-- src/components/views/dialogs/RebrandDialog.tsx | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/RebrandListener.tsx b/src/RebrandListener.tsx index 37d49561b8..3cdc323f52 100644 --- a/src/RebrandListener.tsx +++ b/src/RebrandListener.tsx @@ -25,7 +25,7 @@ import { _t } from './languageHandler'; const TOAST_KEY = 'rebrand'; const NAG_INTERVAL = 24 * 60 * 60 * 1000; -function getRedirectUrl(url) { +function getRedirectUrl(url): string { const redirectUrl = new URL(url); redirectUrl.hash = ''; @@ -34,7 +34,7 @@ function getRedirectUrl(url) { if (url.hostname !== newUrl.hostname || url.pathname !== newUrl.pathname) { redirectUrl.hostname = newUrl.hostname; redirectUrl.pathname = newUrl.pathname; - return redirectUrl; + return redirectUrl.toString(); } return null; } else if (url.hostname === 'riot.im') { diff --git a/src/components/views/dialogs/RebrandDialog.tsx b/src/components/views/dialogs/RebrandDialog.tsx index 6daa33f6de..e886850d28 100644 --- a/src/components/views/dialogs/RebrandDialog.tsx +++ b/src/components/views/dialogs/RebrandDialog.tsx @@ -26,7 +26,7 @@ export enum RebrandDialogKind { }; interface IProps { - onFinished: () => void; + onFinished: (bool) => void; kind: RebrandDialogKind, targetUrl?: string, }