From be0ec5a48a53c26679af79ca161ae00fed79550d Mon Sep 17 00:00:00 2001 From: Andrew Kos Date: Thu, 17 Sep 2015 19:23:21 -0500 Subject: [PATCH] Version to 0.0.5 --- bower.json | 2 +- dist/jquery.instagram-embed-processor.js | 8 ++++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/bower.json b/bower.json index 60ec8d8..e9f3b03 100644 --- a/bower.json +++ b/bower.json @@ -1,6 +1,6 @@ { "name": "bulbs-public-embed-instagram", - "version": "0.0.4", + "version": "0.0.5", "main": [ "dist/jquery.instagram-embed-processor.js" ], diff --git a/dist/jquery.instagram-embed-processor.js b/dist/jquery.instagram-embed-processor.js index d14468e..49e3b1d 100644 --- a/dist/jquery.instagram-embed-processor.js +++ b/dist/jquery.instagram-embed-processor.js @@ -26,7 +26,7 @@ InstagramEmbedProcessor.prototype._getInstagramEmbedScript = function () { }); } - return this.shared.instagramLoaded; + return this.shared.instagramLoaded.promise(); }; InstagramEmbedProcessor.prototype.sanitizeHtml = function (html) { @@ -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 () {