Skip to content

Instantly share code, notes, and snippets.

@thejefflarson
Created February 10, 2016 23:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save thejefflarson/2b0d2b966002c7cf0e99 to your computer and use it in GitHub Desktop.
Save thejefflarson/2b0d2b966002c7cf0e99 to your computer and use it in GitHub Desktop.
if (req.responseText.indexOf('{') == 0) {
try {
eval('obj = '+req.responseText);
} catch (err) {
console.warn('unable to do anything with api rsp');
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment