Skip to content

Commit

Permalink
#21 Add support to disable the keyseparator
Browse files Browse the repository at this point in the history
  • Loading branch information
cheton committed Mar 12, 2016
1 parent 5abccfd commit 726e8da
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/parser.js
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ Parser.prototype.parse = function(key, defaultValue) {
var ns = _.isString(options.ns) ? options.ns : options.ns.defaultNs;
console.assert(_.isString(ns) && !!ns.length, 'ns is not a valid string', ns);

if (key.indexOf(options.nsseparator) > -1) {
if (typeof options.nsseparator === 'string' && key.indexOf(options.nsseparator) > -1) {
var parts = key.split(options.nsseparator);
ns = parts[0];
key = parts[1];
Expand Down

0 comments on commit 726e8da

Please sign in to comment.