From 0ba6cdbdbf9296df1d903c34508d2ff05bdf9bcc Mon Sep 17 00:00:00 2001 From: Mike Wu Date: Wed, 6 Sep 2023 17:25:38 +1000 Subject: [PATCH] refactor --- lib/ReactViews/Story/StoryPanel/StoryBody.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/ReactViews/Story/StoryPanel/StoryBody.tsx b/lib/ReactViews/Story/StoryPanel/StoryBody.tsx index 749bb6c4dcc..b9e8dffd28e 100644 --- a/lib/ReactViews/Story/StoryPanel/StoryBody.tsx +++ b/lib/ReactViews/Story/StoryPanel/StoryBody.tsx @@ -46,7 +46,7 @@ const StoryContainer = styled(Box).attrs((props: { isCollapsed: boolean }) => ({ } `; -function areSourcesAllowed(story: Story) { +function sourcesAreAllowed(story: Story) { let result = true; const parser = new DOMParser(); const parsedDocument = parser.parseFromString(story.text, "text/html"); @@ -61,7 +61,7 @@ function areSourcesAllowed(story: Story) { } function sourceBasedParse(story: Story) { - if (areSourcesAllowed(story)) { + if (sourcesAreAllowed(story)) { return parseCustomHtmlToReact( story.text, { showExternalLinkWarning: true },