Skip to content

Commit 6758ca7

Browse files
committed
Make sure object-fit polyfill only executes for IE11
1 parent dad4fde commit 6758ca7

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
import objectFitImages from 'object-fit-images';
22

33
export default function () {
4-
objectFitImages();
4+
/* Polyfill object-fit for IE11 only */
5+
if (navigator.userAgent.match(/Trident.*rv\:11\./)) {
6+
objectFitImages();
7+
}
58
}

0 commit comments

Comments
 (0)