Plotly_click fired twice when clicked once

Do you know how can I remove ‘plotly_click’ (listener) before adding a new one for plotly?

// with
function listener () {}
gd.on('plotly_click', listener)

// either
gd.removeListener('plotly_click', listener)

// or
gd.removeAllListeners('plotly_click')