rafaelklaessen / react-tradingview-widget

React component for rendering the TradingView Advanced Real-Time Chart Widget.
MIT License
273 stars 94 forks source link

Fix: widget not loading #82

Open cg10036 opened 1 year ago

cg10036 commented 1 year ago
Uncaught DOMException: Failed to execute 'querySelector' on 'Document': '#tradingview-widget-0.08302378337582628' is not a valid selector.
    at Object.embedStylesForFullHeight (https://s3.tradingview.com/tv.js:1:1684)
    at Object.calculateWidgetHeight (https://s3.tradingview.com/tv.js:1:2265)
    at new widget (https://s3.tradingview.com/tv.js:1:5876)
    at TradingViewWidget._this.initWidget (http://localhost:3000/static/js/bundle.js:33894:13)

widget is not loading because of "."(not valid selector). Math.random().toString().slice(2) to remove "0."

cg10036 commented 1 year ago

81