Skip to content
This repository has been archived by the owner on Feb 13, 2019. It is now read-only.

Commit

Permalink
Version to 0.0.5
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrew Kos committed Sep 18, 2015
1 parent 5f2993e commit be0ec5a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "bulbs-public-embed-instagram",
"version": "0.0.4",
"version": "0.0.5",
"main": [
"dist/jquery.instagram-embed-processor.js"
],
Expand Down
8 changes: 6 additions & 2 deletions dist/jquery.instagram-embed-processor.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ InstagramEmbedProcessor.prototype._getInstagramEmbedScript = function () {
});
}

return this.shared.instagramLoaded;
return this.shared.instagramLoaded.promise();
};

InstagramEmbedProcessor.prototype.sanitizeHtml = function (html) {
Expand All @@ -48,16 +48,20 @@ InstagramEmbedProcessor.prototype.prep = function (embedHtml) {
};

InstagramEmbedProcessor.prototype.render = function () {
var rendered;

if (!this.isRendered()) {
this._getInstagramEmbedScript().done(function () {
rendered = this._getInstagramEmbedScript().done(function () {
var code = this.attr('instagram-embed-html');
this.html(unescape(code));
instgrm.Embeds.process();
this.attr('instagram-embed-rendered', true);
}.bind(this.$container));
} else {
rendered = this._getInstagramEmbedScript();
}

return rendered;
};

InstagramEmbedProcessor.prototype.clear = function () {
Expand Down

0 comments on commit be0ec5a

Please sign in to comment.