We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 67c2488 commit d425576Copy full SHA for d425576
lib/sort-json-core.js
@@ -198,7 +198,7 @@ function selectedTextToSortedText(
198
var isObejct = checkIsObjectText(selectedText);
199
200
if (!isObejct) {
201
- throw 'Please make sure your selected text is a JS obejct!';
+ throw { message: 'Please make sure your selected text is a JS obejct!' };
202
}
203
204
var autoIndent = getAutoIndent(selectedText, indent);
@@ -219,7 +219,7 @@ function selectedTextToSortedText(
219
var initialJSON = sorter.textToJSON(jsonParser, json);
220
} catch (e) {
221
if (e.name == 'SyntaxError') {
222
223
} else {
224
throw e;
225
0 commit comments