Element constructor creates new Combinator if a string was passed
This commit is contained in:
parent
d860763454
commit
9cf5f74d31
@ -1,7 +1,8 @@
|
||||
if (typeof(window) === 'undefined') { var tree = require(require('path').join(__dirname, '..', '..', 'less', 'tree')); }
|
||||
|
||||
tree.Element = function Element(combinator, value) {
|
||||
this.combinator = combinator || new(tree.Combinator);
|
||||
this.combinator = combinator instanceof tree.Combinator ?
|
||||
combinator : new(tree.Combinator)(combinator);
|
||||
this.value = value.trim();
|
||||
};
|
||||
tree.Element.prototype.toCSS = function () {
|
||||
|
Loading…
Reference in New Issue
Block a user