react-zendesk icon indicating copy to clipboard operation
react-zendesk copied to clipboard

canUseDom is a function but is being used as a boolean

Open WilliamPriorielloGarda opened this issue 1 year ago • 1 comments

canUseDom is a function defined here https://github.com/B3nnyL/react-zendesk/blob/master/src/index.js#L4

However, you are using it as a boolean in if statements here: https://github.com/B3nnyL/react-zendesk/blob/master/src/index.js#L47 and here https://github.com/B3nnyL/react-zendesk/blob/master/src/index.js#L55

This has the effect of always being truthy. If the function is necessary, then call it. If it's not necessary, it should be removed.

WilliamPriorielloGarda avatar Feb 19 '24 21:02 WilliamPriorielloGarda

https://github.com/B3nnyL/react-zendesk/pull/43

dartess avatar Mar 14 '24 12:03 dartess