Skip to content

Commit

Permalink
Merge pull request #142 from Gaya/background-undefined
Browse files Browse the repository at this point in the history
formatting code
  • Loading branch information
Gaya committed Jul 20, 2015
2 parents 314a122 + 5573d8f commit c73b31c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/ImagePreloader/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,9 @@ ImagePreloader.prototype.determineUrlAndType = function (element) {
var type = "normal";
var style = element.currentStyle || window.getComputedStyle(element, null);

if ((typeof style.backgroundImage != "undefined" && style.backgroundImage !== "" && style.backgroundImage !== "none") || (typeof element.style.backgroundImage != "undefined" && element.style.backgroundImage !== "" && element.style.backgroundImage !== "none")) {
if ((typeof style.backgroundImage !== "undefined" && style.backgroundImage !== "" && style.backgroundImage !== "none")
|| (typeof element.style.backgroundImage !== "undefined" && element.style.backgroundImage !== "" && element.style.backgroundImage !== "none")
) {
//if object has background image
url = (style.backgroundImage || element.style.backgroundImage);
type = "background";
Expand Down

0 comments on commit c73b31c

Please sign in to comment.