Skip to content

Commit 6493bdc

Browse files
Add small clarifying comment in String#evalJSON. [close prototypejs#295]
1 parent de0bead commit 6493bdc

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/prototype/lang/string.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -755,6 +755,7 @@ Object.extend(String.prototype, (function() {
755755
try {
756756
if (!sanitize || json.isJSON()) return eval('(' + json + ')');
757757
} catch (e) { }
758+
// If we get this far, the string is not valid JSON.
758759
throw new SyntaxError('Badly formed JSON string: ' + this.inspect());
759760
}
760761

0 commit comments

Comments
 (0)