diff --git a/src/namespace.js b/src/namespace.js index 8269658c0..f636b2421 100644 --- a/src/namespace.js +++ b/src/namespace.js @@ -172,8 +172,7 @@ NamespacePrototype.add = function add(object) { if (!this.nested) this.nested = {}; object.setOptions(prev.options, true); - } else - throw Error("duplicate name '" + object.name + "' in " + this); + } } } this.nested[object.name] = object; diff --git a/src/parse.js b/src/parse.js index 8644cc1e8..a4769d614 100644 --- a/src/parse.js +++ b/src/parse.js @@ -357,7 +357,7 @@ function parse(source, root) { throw illegal(token, s_name); var name = token; skip("="); - var value = parseId(next()); + var value = parseNumber(next()); parseInlineOptions(parent.values[name] = new Number(value)); // eslint-disable-line no-new-wrappers }