react-truncate
react-truncate copied to clipboard
Fixing jsdom exceptions 'Not implemented: HTMLCanvasElement.prototype.getContext'
Adding null or undefined condition for ellipsis in order to avoid "Not implemented: HTMLCanvasElement.prototype.getContext (without installing the canvas npm package)" during tests see also here: https://github.com/hustcc/jest-canvas-mock/issues/2