Permalink
Browse files

Default undefined key values in config.set to "".

  • Loading branch information...
1 parent 19bf596 commit b02eb3f9433b8176a591518be336b1f90838942f @chromakode chromakode committed with isaacs Mar 20, 2011
Showing with 8 additions and 4 deletions.
  1. +8 −4 lib/config.js
View
@@ -98,10 +98,14 @@ function del (key, cb) {
}
function set (key, val, cb) {
- if (val === undefined && key.indexOf("=") !== -1) {
- var k = key.split("=")
- key = k.shift()
- val = k.join("=")
+ if (val === undefined) {
+ if (key.indexOf("=") !== -1) {
+ var k = key.split("=")
+ key = k.shift()
+ val = k.join("=")
+ } else {
+ val = ""
+ }
}
key = key.trim()
val = val.trim()

0 comments on commit b02eb3f

Please sign in to comment.