react-event-calendar icon indicating copy to clipboard operation
react-event-calendar copied to clipboard

Fix bug whereby on first click, `ref` would be undefined

Open optilude opened this issue 10 years ago • 0 comments

Because of the way the _eventTargets[UID] lookup is only set when the component is first mounted, it seems that on the first click/mouseover/mouseout, the first parameter to the event handler would be undefined.

This change fixes this problem by deferring to a function that can use the closure data.

optilude avatar Nov 29 '15 20:11 optilude