From 84172d1b757b588d032561cd9b4801e3b902f0ce Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A1=C4=8Fa=20Durch=C3=A1nek?= Date: Thu, 11 Feb 2016 14:59:59 +1000 Subject: [PATCH] Fixed bug when class was not copied --- src/object-fit-polyfill.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/object-fit-polyfill.js b/src/object-fit-polyfill.js index 930d4b9..20a489e 100644 --- a/src/object-fit-polyfill.js +++ b/src/object-fit-polyfill.js @@ -91,7 +91,7 @@ oDiv.style.display = "block"; oDiv.style.backgroundImage = "url("+ sSource + ")"; oDiv.style.backgroundPosition = "center center"; - oDiv.style.className = oImages[nKey].className; + oDiv.className = oImages[nKey].className; oDiv.style.backgroundRepeat = "no-repeat"; switch (oImages[nKey].getAttribute('data-object-fit')) {