From 82ae2ab921c5d53a0a6d8961346b96aea24c0c22 Mon Sep 17 00:00:00 2001 From: Federico Brigante Date: Sat, 29 Apr 2017 17:16:04 +0900 Subject: [PATCH] 5.0.1 --- dist/image-promise.min.js | 2 +- package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dist/image-promise.min.js b/dist/image-promise.min.js index a8129d5..1b32b45 100644 --- a/dist/image-promise.min.js +++ b/dist/image-promise.min.js @@ -1,2 +1,2 @@ -/*! npm.im/image-promise 5.0.0 */ +/*! npm.im/image-promise 5.0.1 */ var loadImage=function(){"use strict";function e(r){if(!r)return Promise.reject();if("string"==typeof r){var t=r;r=new Image,r.src=t}else{if(void 0!==r.length){var n=[].map.call(r,function(r){return e(r).catch(function(e){return e})});return Promise.all(n).then(function(e){var r=e.filter(function(e){return e.naturalWidth});return r.length===e.length?r:Promise.reject({loaded:r,errored:e.filter(function(e){return!e.naturalWidth})})})}if("IMG"!==r.tagName)return Promise.reject()}var i=new Promise(function(e,t){function n(){r.naturalWidth?e(r):t(r),r.removeEventListener("load",n),r.removeEventListener("error",n)}r.naturalWidth?e(r):r.complete?t(r):(r.addEventListener("load",n),r.addEventListener("error",n))});return i.image=r,i}return e}(); diff --git a/package.json b/package.json index adf98e3..d685026 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "image-promise", - "version": "5.0.0", + "version": "5.0.1", "description": "Load one or more images, return a promise. Only 0.4KB, for the browser, no dependencies.", "license": "MIT", "repository": "bfred-it/image-promise",