diff --git a/frontend/src/Activity/History/Details/HistoryDetails.js b/frontend/src/Activity/History/Details/HistoryDetails.js
index 293c6d477..f5631c417 100644
--- a/frontend/src/Activity/History/Details/HistoryDetails.js
+++ b/frontend/src/Activity/History/Details/HistoryDetails.js
@@ -7,7 +7,7 @@ import DescriptionListItemTitle from 'Components/DescriptionList/DescriptionList
import Link from 'Components/Link/Link';
import formatDateTime from 'Utilities/Date/formatDateTime';
import formatAge from 'Utilities/Number/formatAge';
-import formatPreferredWordScore from 'Utilities/Number/formatPreferredWordScore';
+import formatCustomFormatScore from 'Utilities/Number/formatCustomFormatScore';
import styles from './HistoryDetails.css';
function HistoryDetails(props) {
@@ -68,7 +68,7 @@ function HistoryDetails(props) {
customFormatScore && customFormatScore !== '0' ?
:
null
}
@@ -200,7 +200,7 @@ function HistoryDetails(props) {
customFormatScore && customFormatScore !== '0' ?
:
null
}
@@ -246,7 +246,7 @@ function HistoryDetails(props) {
customFormatScore && customFormatScore !== '0' ?
:
null
}
diff --git a/frontend/src/Activity/History/HistoryRow.js b/frontend/src/Activity/History/HistoryRow.js
index 32d73f204..86d3d6064 100644
--- a/frontend/src/Activity/History/HistoryRow.js
+++ b/frontend/src/Activity/History/HistoryRow.js
@@ -13,7 +13,7 @@ import EpisodeTitleLink from 'Episode/EpisodeTitleLink';
import SeasonEpisodeNumber from 'Episode/SeasonEpisodeNumber';
import { icons, tooltipPositions } from 'Helpers/Props';
import SeriesTitleLink from 'Series/SeriesTitleLink';
-import formatPreferredWordScore from 'Utilities/Number/formatPreferredWordScore';
+import formatCustomFormatScore from 'Utilities/Number/formatCustomFormatScore';
import HistoryDetailsModal from './Details/HistoryDetailsModal';
import HistoryEventTypeCell from './HistoryEventTypeCell';
import styles from './HistoryRow.css';
@@ -212,7 +212,7 @@ class HistoryRow extends Component {
className={styles.customFormatScore}
>
}
position={tooltipPositions.BOTTOM}
diff --git a/frontend/src/InteractiveImport/Interactive/InteractiveImportRow.tsx b/frontend/src/InteractiveImport/Interactive/InteractiveImportRow.tsx
index dd740afef..2c49de695 100644
--- a/frontend/src/InteractiveImport/Interactive/InteractiveImportRow.tsx
+++ b/frontend/src/InteractiveImport/Interactive/InteractiveImportRow.tsx
@@ -30,7 +30,7 @@ import {
import { SelectStateInputProps } from 'typings/props';
import Rejection from 'typings/Rejection';
import formatBytes from 'Utilities/Number/formatBytes';
-import formatPreferredWordScore from 'Utilities/Number/formatPreferredWordScore';
+import formatCustomFormatScore from 'Utilities/Number/formatCustomFormatScore';
import translate from 'Utilities/String/translate';
import InteractiveImportRowCellPlaceholder from './InteractiveImportRowCellPlaceholder';
import styles from './InteractiveImportRow.css';
@@ -431,7 +431,7 @@ function InteractiveImportRow(props: InteractiveImportRowProps) {
{customFormats?.length ? (
diff --git a/frontend/src/InteractiveSearch/InteractiveSearchRow.tsx b/frontend/src/InteractiveSearch/InteractiveSearchRow.tsx
index 077b7d4ce..53ee5dd2e 100644
--- a/frontend/src/InteractiveSearch/InteractiveSearchRow.tsx
+++ b/frontend/src/InteractiveSearch/InteractiveSearchRow.tsx
@@ -19,7 +19,7 @@ import CustomFormat from 'typings/CustomFormat';
import formatDateTime from 'Utilities/Date/formatDateTime';
import formatAge from 'Utilities/Number/formatAge';
import formatBytes from 'Utilities/Number/formatBytes';
-import formatPreferredWordScore from 'Utilities/Number/formatPreferredWordScore';
+import formatCustomFormatScore from 'Utilities/Number/formatCustomFormatScore';
import OverrideMatchModal from './OverrideMatch/OverrideMatchModal';
import Peers from './Peers';
import ReleaseEpisode from './ReleaseEpisode';
@@ -236,7 +236,7 @@ function InteractiveSearchRow(props: InteractiveSearchRowProps) {
}
position={tooltipPositions.BOTTOM}
diff --git a/frontend/src/Utilities/Number/formatPreferredWordScore.js b/frontend/src/Utilities/Number/formatCustomFormatScore.ts
similarity index 50%
rename from frontend/src/Utilities/Number/formatPreferredWordScore.js
rename to frontend/src/Utilities/Number/formatCustomFormatScore.ts
index 5869f0052..b4da3a2cd 100644
--- a/frontend/src/Utilities/Number/formatPreferredWordScore.js
+++ b/frontend/src/Utilities/Number/formatCustomFormatScore.ts
@@ -1,5 +1,7 @@
-
-function formatPreferredWordScore(input, customFormatsLength = 0) {
+function formatCustomFormatScore(
+ input?: number,
+ customFormatsLength = 0
+): string {
const score = Number(input);
if (score > 0) {
@@ -7,10 +9,10 @@ function formatPreferredWordScore(input, customFormatsLength = 0) {
}
if (score < 0) {
- return score;
+ return `${score}`;
}
return customFormatsLength > 0 ? '+0' : '';
}
-export default formatPreferredWordScore;
+export default formatCustomFormatScore;