Skip to content

Commit

Permalink
Fixed issue in network/images.js where load() would return undefined …
Browse files Browse the repository at this point in the history
…if image was already loaded
  • Loading branch information
brendon1982 committed Jan 9, 2015
1 parent 00649c2 commit 7f60681
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lib/network/Images.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,11 @@ Images.prototype.setOnloadCallback = function(callback) {
* @return {Image} img The image object
*/
Images.prototype.load = function(url, brokenUrl) {
if (this.images[url] == undefined) {
var img = this.images[url];
if (img === undefined) {
// create the image
var me = this;
var img = new Image();
img = new Image();
img.onload = function () {

// IE11 fix -- thanks dponch!
Expand Down

0 comments on commit 7f60681

Please sign in to comment.