Skip to content
This repository has been archived by the owner on May 3, 2021. It is now read-only.

Commit

Permalink
Fix CORS empty response issue
Browse files Browse the repository at this point in the history
  • Loading branch information
jsanahuja committed Feb 25, 2021
1 parent ae833e5 commit cb48e0f
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
7 changes: 5 additions & 2 deletions jquery.instagramFeed.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*!
* jquery.instagramFeed
*
* @version 2.1.0
* @version 2.1.1
*
* https://github.com/jsanahuja/jquery.instagramFeed
*
Expand Down Expand Up @@ -125,7 +125,10 @@
}
data = JSON.parse(data.substr(0, data.length - 1));
data = data.entry_data.ProfilePage || data.entry_data.TagPage;
return data[0].graphql.user || data[0].graphql.hashtag;
if(typeof data !== "undefined"){
return data[0].graphql.user || data[0].graphql.hashtag;
}
return false;
break;
case "userid":
if(typeof data.data.user !== "undefined"){
Expand Down
2 changes: 1 addition & 1 deletion jquery.instagramFeed.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "jquery.instagramFeed",
"description": "Instagram Feed without access token. Not using the Instagram API",
"homepage": "https://github.com/jsanahuja/jquery.instagramFeed",
"version": "2.1.0",
"version": "2.1.1",
"keywords": [
"instagram",
"feed",
Expand Down

0 comments on commit cb48e0f

Please sign in to comment.