Open walling opened 11 years ago
Quick-fix (needs to be implemented for all users of tinycolor):
if (typeof(''.bgDefault) !== 'string') {
require('tinycolor');
}
However, this module seems unmaintained, and I'm switching to chalk. They don't extend String.prototype
, which leads to issues like this one.
This module fails to load, if it's already loaded by another module, on this line: https://github.com/einaros/tinycolor/blob/master/tinycolor.js#L32
The issue is that the properties can not be overwritten twice. Is it possible to include a check, if this module is already loaded, and if that is the case, do nothing?