There was an error while loading. Please reload this page.
2 parents 983c5bf + 139b8f3 commit ab9cabdCopy full SHA for ab9cabd
index.js
@@ -8,7 +8,7 @@
8
'use strict'
9
10
module.exports = function hexColorRegex (opts) {
11
- opts = typeof opts === 'object' ? opts : {}
+ opts = opts && typeof opts === 'object' ? opts : {}
12
13
return opts.strict ? /^#([a-f0-9]{6}|[a-f0-9]{3})\b$/i : /#([a-f0-9]{6}|[a-f0-9]{3})\b/gi
14
}
0 commit comments