federomero / pretty-json

Atom plugin. Format JSON documents.
MIT License
94 stars 23 forks source link

Uncaught TypeError: Cannot read property 'getLastSelection' of undefined #64

Closed chunxinhou closed 7 years ago

chunxinhou commented 7 years ago

[Enter steps to reproduce:]

  1. ...
  2. ...

Atom: 1.14.4 ia32 Electron: 1.3.13 OS: Unknown Windows version Thrown From: pretty-json package 1.6.1

Stack Trace

Uncaught TypeError: Cannot read property 'getLastSelection' of undefined

At C:\Users\侯春鑫\.atom\packages\pretty-json\index.coffee:106

TypeError: Cannot read property 'getLastSelection' of undefined
    at Object.prettify (/packages/pretty-json/index.coffee:106:19)
    at /packages/pretty-json/index.coffee:146:10)
    at CommandRegistry.module.exports.CommandRegistry.handleCommandEvent (/app.asar/src/command-registry.js:259:29)
    at /app.asar/src/command-registry.js:3:59
    at CommandPaletteView.module.exports.CommandPaletteView.confirmed (/app.asar/node_modules/command-palette/lib/command-palette-view.js:210:32)
    at CommandPaletteView.module.exports.SelectListView.confirmSelection (/app.asar/node_modules/atom-space-pen-views/lib/select-list-view.js:338:21)
    at /app.asar/node_modules/atom-space-pen-views/lib/select-list-view.js:139:19)
    at HTMLOListElement.dispatch (/app.asar/node_modules/jquery/dist/jquery.js:4435:9)
    at HTMLOListElement.elemData.handle (/app.asar/node_modules/jquery/dist/jquery.js:4121:28)

Commands

  4x -2:33 core:move-up (input.hidden-input)
     -2:31.6.0 editor:newline (input.hidden-input)
     -2:29.6.0 core:save (input.hidden-input)
     -2:20.4.0 command-palette:toggle (div.markdown-preview.native-key-bindings)
     -2:06.0 core:move-down (input.hidden-input)
     -2:04.0 core:move-up (input.hidden-input)
     -2:03.4.0 core:confirm (input.hidden-input)
     -2:03.4.0 pretty-json:minify (div.markdown-preview.native-key-bindings)
     -1:58.4.0 command-palette:toggle (div.markdown-preview.native-key-bindings)
     -1:54.5.0 core:backspace (input.hidden-input)
     -1:53.4.0 core:move-down (input.hidden-input)
     -1:52.4.0 core:confirm (input.hidden-input)
     -1:52.4.0 pretty-json:prettify (div.markdown-preview.native-key-bindings)
  2x -0:31 core:copy (div.panels)
     -0:16.6.0 command-palette:toggle (div.panels)
     -0:11 pretty-json:prettify (div.panels)

Non-Core Packages

pretty-json 1.6.1 
lexicalunit commented 7 years ago

This will be fixed shortly.