react-plotly.js icon indicating copy to clipboard operation
react-plotly.js copied to clipboard

Uncaught TypeError: Cannot read property 'match' of null when clicking any options in the ModeBar

Open SnowNooDLe opened this issue 4 years ago • 0 comments

"plotly.js": "^1.55.2"
"react": "^16.13.1"
"react-plotly.js": ^"2.5.0"

I am using react-plotly.js for our project.

I haven't modified much on this ModeBar (image below)

image

Added only two configs to the ModeBar

config={{
          displayModeBar: true,
          toImageButtonOptions: {
            filename: "something",
          },
        }}

It doesn't always happen but time to time, by clicking one of the options from the ModeBar, it still does the job without crashing the app but in console, it prints the following errors.

image

Right after I created this issue, just refreshed the app and went over exact same steps but no warning message this time.

I am quite new to React and this error message only comes from ModeBar buttons so I am assuming it's something to do with plotly.js library?

SnowNooDLe avatar Nov 26 '20 21:11 SnowNooDLe