From c1fa14f7495f9ad952b181dd4ec2e9c710295742 Mon Sep 17 00:00:00 2001
From: shamoon <4887959+shamoon@users.noreply.github.com>
Date: Mon, 1 Jul 2024 17:15:20 -0700
Subject: [PATCH] Simplify
---
src/widgets/stocks/component.jsx | 12 +-----------
1 file changed, 1 insertion(+), 11 deletions(-)
diff --git a/src/widgets/stocks/component.jsx b/src/widgets/stocks/component.jsx
index cdf043855..844365cb2 100644
--- a/src/widgets/stocks/component.jsx
+++ b/src/widgets/stocks/component.jsx
@@ -86,17 +86,7 @@ export default function Component({ service }) {
const { widget } = service;
const { watchlist, showUSMarketStatus } = widget;
- if (!watchlist || !watchlist.length || watchlist.length > 28) {
- return (
-
-
-
- );
- }
-
- const hasDuplicates = new Set(watchlist).size !== watchlist.length;
-
- if (hasDuplicates) {
+ if (!watchlist || !watchlist.length || watchlist.length > 28 || new Set(watchlist).size !== watchlist.length) {
return (