senchalabs/jsduck — Issue #106: Exception while parsing second parameter of Ext.define
Author: chge
Created: 2011-12-14 19:04:27+00:00
State: open

It seems that second parameter of Ext.define is treated as method when documented. JSDuck crashes while trying to parse something like this:

```javascript
Ext.define('my.awesome.Class', {
...
},
/**
* This function will be called called after class definition.
*/
function() {
...
}
);
```

```
.../merger.rb:238:in `create_member_id': undefined method `gsub' for nil:NilClass (NoMethodError)
```

[Merger.create_member_id](https://github.com/senchalabs/jsduck/blob/master/lib/jsduck/merger.rb#L238):

```ruby
name = m[:name].gsub(/\$/, 'S-')
```

Maybe it's better just test whether ```m[:name]``` exists or not.