carlosbaraza/yard

Uncaught TypeError: Cannot read property '3' of undefined

Closed this issue · 1 comments

[Enter steps to reproduce:]

  1. Navigate to def keyword (on line 4)
  2. Press ctrl + Enter

Atom: 1.20.1 x64
Electron: 1.6.9
OS: Mac OS X 10.12.6
Thrown From: yard package 0.3.1

Stack Trace

Uncaught TypeError: Cannot read property '3' of undefined

At /Applications/Atom.app/Contents/Resources/app/node_modules/text-buffer/lib/text-buffer.js:899

TypeError: Cannot read property '3' of undefined
    at Object.findStartRow (/packages/yard/lib/yard.coffee:19:32)
    at /packages/yard/lib/yard.coffee:12:21
    at TextBuffer.module.exports.TextBuffer.transact (/Applications/Atom.app/Contents/Resources/app/node_modules/text-buffer/lib/text-buffer.js:894:24)
    at TextEditor.module.exports.TextEditor.transact (/Applications/Atom.app/Contents/Resources/app/src/text-editor.js:1673:32)
    at Object.create (/packages/yard/lib/yard.coffee:11:12)
    at /packages/yard/lib/yard.coffee:6:60)
    at CommandRegistry.module.exports.CommandRegistry.handleCommandEvent (/Applications/Atom.app/Contents/Resources/app/src/command-registry.js:265:35)
    at /Applications/Atom.app/Contents/Resources/app/src/command-registry.js:3:65
    at KeymapManager.module.exports.KeymapManager.dispatchCommandEvent (/Applications/Atom.app/Contents/Resources/app/node_modules/atom-keymap/lib/keymap-manager.js:621:22)
    at KeymapManager.module.exports.KeymapManager.handleKeyboardEvent (/Applications/Atom.app/Contents/Resources/app/node_modules/atom-keymap/lib/keymap-manager.js:412:28)
    at WindowEventHandler.module.exports.WindowEventHandler.handleDocumentKeyEvent (/Applications/Atom.app/Contents/Resources/app/src/window-event-handler.js:100:42)
    at HTMLDocument.<anonymous> (/Applications/Atom.app/Contents/Resources/app/src/window-event-handler.js:3:65)

Commands

     -0:05.5.0 yard:create (input.hidden-input)

Non-Core Packages

atom-beautify 0.30.5 
autocomplete-emojis 2.5.0 
file-icons 2.1.11 
haskell-grammar 0.4.0 
highlight-selected 0.13.1 
language-babel 2.72.0 
language-graphql 0.9.0 
language-haml 0.25.1 
language-ini 1.19.0 
language-lua 0.9.11 
language-ocaml 1.9.5 
language-rust 0.4.12 
language-scala 1.1.9 
language-swift 0.5.0 
language-terraform 0.8.1 
language-thrift 1.0.2 
linter 2.2.0 
linter-coffeelint 1.3.1 
linter-haml 2.0.1 
linter-pylint 2.1.0 
linter-rubocop 2.1.1 
linter-scss-lint 3.1.0 
MagicPython 1.0.12 
merge-conflicts 1.4.5 
nuclide 0.247.0 
nuclide-format-js 0.0.41 
set-syntax 0.3.2 
sort-lines 0.14.0 
tool-bar 1.1.0 
yard 0.3.1 

Fixed in current release