Comparing version 0.1.1 to 0.1.2
11
index.js
@@ -161,4 +161,11 @@ (function (global, factory) { | ||
} | ||
} else if (typeof opt === 'string') { | ||
out.push(opt); | ||
} else { | ||
//null is skip | ||
if (opt === undefined) { | ||
opt = ''; | ||
} | ||
if (typeof opt === 'string') { | ||
out.push(opt); | ||
} | ||
} | ||
@@ -165,0 +172,0 @@ |
@@ -56,3 +56,3 @@ class PrefixArray { | ||
} | ||
} else { | ||
} else {//null is skip | ||
if(opt===undefined){opt='';} | ||
@@ -66,2 +66,3 @@ if(typeof opt==='string'){ | ||
let classnames = (prefix) => { | ||
@@ -68,0 +69,0 @@ return (opt, originOpt) => { |
{ | ||
"name": "rc-class", | ||
"version": "0.1.1", | ||
"version": "0.1.2", | ||
"description": "handle multiple react classnames", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -27,2 +27,5 @@ ## rc-class | ||
cn('content').className //result bot-content | ||
cn(null,'content').className //result content | ||
... | ||
@@ -29,0 +32,0 @@ |
10384
292
35