This commit is contained in:
shamoon
2024-07-01 17:15:20 -07:00
parent 2fba5da769
commit c1fa14f749

View File

@@ -86,17 +86,7 @@ export default function Component({ service }) {
const { widget } = service;
const { watchlist, showUSMarketStatus } = widget;
if (!watchlist || !watchlist.length || watchlist.length > 28) {
return (
<Container service={service}>
<Block value={t("stocks.invalidConfiguration")} />
</Container>
);
}
const hasDuplicates = new Set(watchlist).size !== watchlist.length;
if (hasDuplicates) {
if (!watchlist || !watchlist.length || watchlist.length > 28 || new Set(watchlist).size !== watchlist.length) {
return (
<Container service={service}>
<Block value={t("stocks.invalidConfiguration")} />