using '== null' to check for soaked accessor chains instead of '== undefined' -- shorter, and slightly safer
This commit is contained in:
parent
a278d8f018
commit
0270e48a01
|
@ -316,7 +316,7 @@
|
||||||
// A value, indexed or dotted into, or vanilla.
|
// A value, indexed or dotted into, or vanilla.
|
||||||
ValueNode = (exports.ValueNode = inherit(Node, {
|
ValueNode = (exports.ValueNode = inherit(Node, {
|
||||||
type: 'Value',
|
type: 'Value',
|
||||||
SOAK: " == undefined ? undefined : ",
|
SOAK: " == null ? undefined : ",
|
||||||
constructor: function constructor(base, properties) {
|
constructor: function constructor(base, properties) {
|
||||||
this.children = flatten([(this.base = base), (this.properties = (properties || []))]);
|
this.children = flatten([(this.base = base), (this.properties = (properties || []))]);
|
||||||
return this;
|
return this;
|
||||||
|
|
|
@ -228,7 +228,7 @@ statement ReturnNode, true
|
||||||
ValueNode: exports.ValueNode: inherit Node, {
|
ValueNode: exports.ValueNode: inherit Node, {
|
||||||
type: 'Value'
|
type: 'Value'
|
||||||
|
|
||||||
SOAK: " == undefined ? undefined : "
|
SOAK: " == null ? undefined : "
|
||||||
|
|
||||||
constructor: (base, properties) ->
|
constructor: (base, properties) ->
|
||||||
@children: flatten [@base: base, @properties: (properties or [])]
|
@children: flatten [@base: base, @properties: (properties or [])]
|
||||||
|
|
Loading…
Reference in New Issue