Skip to content

Commit 3bfbf31

Browse files
committed
Only use context if one was provided
1 parent edc5948 commit 3bfbf31

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/jsonselect.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141

4242
// throw an error message
4343
function te(ec, context) {
44-
throw new Error(errorCodes[ec] + " in '" + context + "'");
44+
throw new Error(errorCodes[ec] + ( context && " in '" + context + "'"));
4545
}
4646

4747
// THE LEXER

0 commit comments

Comments
 (0)