diff --git a/src/ChartProComponent.tsx b/src/ChartProComponent.tsx index 4769635..253284c 100644 --- a/src/ChartProComponent.tsx +++ b/src/ChartProComponent.tsx @@ -309,12 +309,12 @@ const ChartProComponent: Component = props => { }) createEffect((prev?: PrevSymbolPeriod) => { + const s = symbol() + const p = period() if (!loading) { if (prev) { props.datafeed.unsubscribe(prev.symbol, prev.period) } - const s = symbol() - const p = period() loading = true setLoadingVisible(true) const get = async () => {