diy-template-components 2.0.3 → 2.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/build/index.es.js CHANGED
@@ -321,9 +321,9 @@ const alpha = {
321
321
  eightyPercent: 0.8
322
322
  };
323
323
  const getRGBFromHex = hex => {
324
- const r = parseInt(hex.slice(1, 3), 16);
325
- const g = parseInt(hex.slice(3, 5), 16);
326
- const b = parseInt(hex.slice(5, 7), 16);
324
+ const r = parseInt(hex?.slice(1, 3), 16);
325
+ const g = parseInt(hex?.slice(3, 5), 16);
326
+ const b = parseInt(hex?.slice(5, 7), 16);
327
327
  return [r, g, b];
328
328
  };
329
329
  const hexToRgbA = (hex, alpha = null) => {