Skip to content

Commit d425576

Browse files
committed
FIx the wrong message
1 parent 67c2488 commit d425576

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/sort-json-core.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,7 @@ function selectedTextToSortedText(
198198
var isObejct = checkIsObjectText(selectedText);
199199

200200
if (!isObejct) {
201-
throw 'Please make sure your selected text is a JS obejct!';
201+
throw { message: 'Please make sure your selected text is a JS obejct!' };
202202
}
203203

204204
var autoIndent = getAutoIndent(selectedText, indent);
@@ -219,7 +219,7 @@ function selectedTextToSortedText(
219219
var initialJSON = sorter.textToJSON(jsonParser, json);
220220
} catch (e) {
221221
if (e.name == 'SyntaxError') {
222-
throw 'Please make sure your selected text is a JS obejct!';
222+
throw { message: 'Please make sure your selected text is a JS obejct!' };
223223
} else {
224224
throw e;
225225
}

0 commit comments

Comments
 (0)