diff --git a/index.js b/index.js index dd183e5..3f1e5b2 100644 --- a/index.js +++ b/index.js @@ -515,6 +515,10 @@ class Pass { */ function isValidRGB(value) { + if (!value || typeof value !== "string") { + return false; + } + let rgb = value.match(/^rgb\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*\)/); if (!rgb) {