react-datocms
Advanced tools
Comparing version 1.2.3 to 1.2.4
@@ -25,2 +25,3 @@ "use strict"; | ||
var isSsr = typeof window === "undefined"; | ||
var universalBtoa = isSsr ? function (str) { return Buffer.from(str.toString(), 'binary').toString('base64'); } : window.btoa; | ||
var isIntersectionObserverAvailable = isSsr | ||
@@ -91,3 +92,3 @@ ? false | ||
var svg = "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"" + width + "\" height=\"" + height + "\"></svg>"; | ||
var sizer = (react_1["default"].createElement("img", { className: pictureClassName, style: __assign({ display: "block", width: explicitWidth ? width + "px" : "100%" }, pictureStyle), src: "data:image/svg+xml;base64," + btoa(svg) })); | ||
var sizer = (react_1["default"].createElement("img", { className: pictureClassName, style: __assign({ display: "block", width: explicitWidth ? width + "px" : "100%" }, pictureStyle), src: "data:image/svg+xml;base64," + universalBtoa(svg) })); | ||
return (react_1["default"].createElement("div", { ref: ref, className: className, style: __assign(__assign({ display: explicitWidth ? "inline-block" : "block", overflow: "hidden" }, style), { position: "relative" }) }, | ||
@@ -94,0 +95,0 @@ sizer, |
{ | ||
"name": "react-datocms", | ||
"version": "1.2.3", | ||
"version": "1.2.4", | ||
"types": "dist/index.d.ts", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
Sorry, the diff of this file is not supported yet
37905
326