Getting Error: TypeError: Cannot read property 'match' of undefined


#1

Recently, I started getting the following error:

TypeError: Cannot read property 'match' of undefined
  at TokenizedBuffer.module.exports.TokenizedBuffer.indentLevelForLine (/Applications/Atom.app/Contents/Resources/app.asar/src/tokenized-buffer.js:680:23)
  at DisplayBuffer.module.exports.DisplayBuffer.indentLevelForLine (/Applications/Atom.app/Contents/Resources/app.asar/src/display-buffer.js:820:35)
  at TextEditor.module.exports.TextEditor.indentLevelForLine (/Applications/Atom.app/Contents/Resources/app.asar/src/text-editor.js:2312:33)
  at TextEditor.module.exports.TextEditor.indentationForBufferRow (/Applications/Atom.app/Contents/Resources/app.asar/src/text-editor.js:2284:19)
  at Object.module.exports.Helpers.rangeFromLineNumber (/Users/mneumark/.atom/packages/linter-ruby/node_modules/atom-linter/lib/helpers.coffee:55:30)
  at /Users/mneumark/.atom/packages/linter-ruby/lib/main.js:53:30
  at Array.forEach (native)
  at /Users/mneumark/.atom/packages/linter-ruby/lib/main.js:47:33

It seems to be triggered after I delete an empty line. When I go from this:

    it 'should include status' do

      first_report
    end

to this:

    it 'should include status' do
      first_report
    end

I get the above error.

If it helps, this is on a Mac running 1.0.8 in Mac OS X 10.10.5


#2

From this:

  at /Users/mneumark/.atom/packages/linter-ruby/lib/main.js:53:30
  at Array.forEach (native)
  at /Users/mneumark/.atom/packages/linter-ruby/lib/main.js:47:33

It looks like the issue is with the linter-ruby package. You should file an Issue there.


#3

Oh, dur, I missed that, usually error messages are a lot more clear about them coming from a package.