filipesabella / quick-file-actions

Atom package for quick file actions.
MIT License
2 stars 2 forks source link

Uncaught TypeError: event.target.getModel is not a function #5

Closed viddo closed 7 years ago

viddo commented 7 years ago
  1. Trigger quick-file-actions:move command for a current text file (also happens on the other commands, e.g. delete, copy)
  2. Change filename e.g. test.md => test.txt
  3. Hit enter, and get the error notification with this stack trace:

Atom: 1.19.0-beta1 x64 Electron: 1.6.9 OS: Mac OS X 10.12.5 Thrown From: quick-file-actions package 0.2.0

Stack Trace

Uncaught TypeError: event.target.getModel is not a function

At /Volumes/tmp/.atom-beta/packages/quick-file-actions/lib/quick-file-actions-view.js:21

TypeError: event.target.getModel is not a function
    at /packages/quick-file-actions/lib/quick-file-actions-view.js:21:38)
    at CommandRegistry.module.exports.CommandRegistry.handleCommandEvent (/Applications/Atom Beta.app/Contents/Resources/app/src/command-registry.js:265:35)
    at /Applications/Atom Beta.app/Contents/Resources/app/src/command-registry.js:3:65
    at KeymapManager.module.exports.KeymapManager.dispatchCommandEvent (/Applications/Atom Beta.app/Contents/Resources/app/node_modules/atom-keymap/lib/keymap-manager.js:610:22)
    at KeymapManager.module.exports.KeymapManager.handleKeyboardEvent (/Applications/Atom Beta.app/Contents/Resources/app/node_modules/atom-keymap/lib/keymap-manager.js:401:28)
    at WindowEventHandler.module.exports.WindowEventHandler.handleDocumentKeyEvent (/Applications/Atom Beta.app/Contents/Resources/app/src/window-event-handler.js:100:42)
    at HTMLDocument.<anonymous> (/Applications/Atom Beta.app/Contents/Resources/app/src/window-event-handler.js:3:65)

Commands

     -0:21.2.0 core:backspace (input.hidden-input)
     -0:20.4.0 editor:select-to-first-character-of-line (input.hidden-input)
  2x -0:17.7.0 core:backspace (input.hidden-input)
     -0:14.4.0 vim-mode-plus:activate-normal-mode (input.hidden-input)
  2x -0:14.2.0 core:save (input.hidden-input)
     -0:13.4.0 core:close (input.hidden-input)
     -0:11.8.0 textual-velocity:focus-on-search (input.hidden-input)
     -0:10.6.0 quick-file-actions:move (input.tv-input.tv-input--search.native-key-bindings)
     -0:08.9.0 core:backspace (input.hidden-input)
     -0:08.4.0 core:confirm (input.hidden-input)
     -0:06.4.0 editor:consolidate-selections (input.hidden-input)
  2x -0:06.4.0 core:cancel (input.hidden-input)
     -0:04.2.0 quick-file-actions:move (input.hidden-input)
  2x -0:02.9.0 core:confirm (input.hidden-input)
     -0:01.2.0 editor:consolidate-selections (input.hidden-input)
     -0:01.2.0 core:cancel (input.hidden-input)

Non-Core Packages

autocomplete-paths 1.0.5 
date 1.2.2 
file-icons 2.1.7 
gfm-lists 1.0.0 
hey-pane 1.0.0 
highlight-selected 0.13.1 
jumpy 3.1.3 
minimap 4.28.2 
minimap-find-and-replace 4.5.2 
minimap-highlight-selected 4.6.1 
quick-file-actions 0.2.0 
recent-files-fuzzy-finder 0.3.2 
textual-velocity 0.15.0 
toggle-markdown-task 0.6.0 
vim-mode-plus 0.93.0 
wikilink 0.14.0 
zentabs 0.8.8 
filipesabella commented 7 years ago

Hey, @viddo thanks for the report. I can't reproduce the issue with the latest stable, 1.18.0, but I'm able to reproduce it in Beta.

I'll work on a fix.

filipesabella commented 7 years ago

@viddo I pushed a patch to fix the API change.

Please do let me know if it works for you.

viddo commented 7 years ago

Yeah, now it works fine again 👌

viddo commented 7 years ago

Thanks! 🙇