From 1274ec84efeb6770d36026ef97cac3d36d853fa5 Mon Sep 17 00:00:00 2001 From: Arjun Patel Date: Fri, 1 Mar 2024 10:13:43 -0500 Subject: [PATCH] refactor --- .../LogView/LoadingPage/useResolveLogURLAndRenderingType.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/pages/LogView/LoadingPage/useResolveLogURLAndRenderingType.ts b/src/pages/LogView/LoadingPage/useResolveLogURLAndRenderingType.ts index 8ab03384..8de25392 100644 --- a/src/pages/LogView/LoadingPage/useResolveLogURLAndRenderingType.ts +++ b/src/pages/LogView/LoadingPage/useResolveLogURLAndRenderingType.ts @@ -202,10 +202,10 @@ export const useResolveLogURLAndRenderingType = ({ text: false, }); downloadURL = rawLogURL; - if ((renderingTypeFromQuery || "") in LogRenderingTypes) { - renderingType = renderingTypeFromQuery as LogRenderingTypes; - } else if (!renderingTypeFromQuery) { + if (!renderingTypeFromQuery) { renderingType = LogRenderingTypes.Default; + } else if (renderingTypeFromQuery in LogRenderingTypes) { + renderingType = renderingTypeFromQuery as LogRenderingTypes; } else { renderingType = LogRenderingTypes.Default; reportError(new Error("Encountered unsupported renderingType"), {