if something other than a Value was passed to the Rule constructor, wrap it in a Value

This commit is contained in:
cloudhead 2010-03-07 18:50:31 -05:00
parent 23775bda9b
commit 7666c71b80

View File

@ -2,7 +2,7 @@ if (typeof(window) === 'undefined') { var tree = require(require('path').join(__
tree.Rule = function Rule(name, value) {
this.name = name;
this.value = value;
this.value = (value instanceof tree.Value) ? value : new(tree.Value)([value]);
if (name.charAt(0) === '@') {
this.variable = true;