mirror of
https://github.com/jashkenas/coffeescript.git
synced 2022-11-09 12:23:24 -05:00
using '== null' to check for soaked accessor chains instead of '== undefined' -- shorter, and slightly safer
This commit is contained in:
parent
a278d8f018
commit
0270e48a01
2 changed files with 2 additions and 2 deletions
|
@ -316,7 +316,7 @@
|
|||
// A value, indexed or dotted into, or vanilla.
|
||||
ValueNode = (exports.ValueNode = inherit(Node, {
|
||||
type: 'Value',
|
||||
SOAK: " == undefined ? undefined : ",
|
||||
SOAK: " == null ? undefined : ",
|
||||
constructor: function constructor(base, properties) {
|
||||
this.children = flatten([(this.base = base), (this.properties = (properties || []))]);
|
||||
return this;
|
||||
|
|
|
@ -228,7 +228,7 @@ statement ReturnNode, true
|
|||
ValueNode: exports.ValueNode: inherit Node, {
|
||||
type: 'Value'
|
||||
|
||||
SOAK: " == undefined ? undefined : "
|
||||
SOAK: " == null ? undefined : "
|
||||
|
||||
constructor: (base, properties) ->
|
||||
@children: flatten [@base: base, @properties: (properties or [])]
|
||||
|
|
Loading…
Add table
Reference in a new issue