Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot sort setting.json (VSCode Settings) v1.19.1 #45

Closed
chavyleung opened this issue Dec 24, 2020 · 6 comments · Fixed by #46
Closed

Cannot sort setting.json (VSCode Settings) v1.19.1 #45

chavyleung opened this issue Dec 24, 2020 · 6 comments · Fixed by #46

Comments

@chavyleung
Copy link
Contributor

But it works well under 1.19.0

@chavyleung chavyleung changed the title Cannot sort in 1.19.1 Cannot sort setting.json (VSCode Settings) v1.19.1 Dec 24, 2020
@jamesfancy
Copy link

Cannot sort other json yet.

@singularitti
Copy link

singularitti commented Dec 27, 2020

Same here!

VSCode:
Version: 1.52.1
Commit: ea3859d4ba2f3e577a159bc91e3074c5d85c0523
Date: 2020-12-16T16:30:02.420Z
Electron: 9.3.5
Chrome: 83.0.4103.122
Node.js: 12.14.1
V8: 8.3.110.13-electron.0
OS: Darwin x64 20.2.0

@arosh
Copy link

arosh commented Jan 2, 2021

I am having a similar problem in my environment.

Previously, when I ran "Sort JSON" without selecting any text, the entire settings.json was sorted, but now it does not work. If I select the entire text and then run "Sort JSON", it works.

@richie5um
Copy link
Owner

Sorry everyone, I’ll take a look.

@Tatsh
Copy link

Tatsh commented Jan 5, 2021

I get this error in the console:

[Extension Host] TypeError: Cannot read property 'includes' of undefined    
at sortActiveSelectionInternal (/Users/andrew.udvare/.vscode/extensions/richie5um2.vscode-sort-json-1.19.1/lib/sort-json.js:116:28)
    at sortActiveSelection (/Users/andrew.udvare/.vscode/extensions/richie5um2.vscode-sort-json-1.19.1/lib/sort-json.js:72:13)
    at _executeContributedCommand (/Applications/MacPorts/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:701:220)    
at _.$executeContributedCommand (/Applications/MacPorts/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:701:595)    
at m._doInvokeHandler (/Applications/MacPorts/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:892:926)    
at m._invokeHandler (/Applications/MacPorts/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:892:618)    
at m._receiveRequest (/Applications/MacPorts/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:891:252)    ...

@Tatsh
Copy link

Tatsh commented Jan 5, 2021

Selecting then sorting works.

chavyleung added a commit to chavyleung/vscode-sort-json that referenced this issue Jan 7, 2021
richie5um pushed a commit that referenced this issue Jan 7, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants