We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 5d70213 + 6e5669d commit f03b358Copy full SHA for f03b358
package.json
@@ -1,6 +1,6 @@
1
{
2
"name": "react-scroll-to",
3
- "version": "3.0.0-beta.1",
+ "version": "3.0.0-beta.2",
4
"description": "Scroll to a position using react",
5
"main": "./dist/react-scroll-to.js",
6
"types": "./dist/definitions",
src/ScrollTo.tsx
@@ -3,7 +3,9 @@ import ReactDOM from "react-dom";
import * as smoothscroll from "smoothscroll-polyfill";
// Polyfill scrollTo() in Safari, IE, and Edge
-smoothscroll.polyfill();
+if (window) {
7
+ smoothscroll.polyfill();
8
+}
9
10
interface IContextProps {
11
addScrollArea(id: string, node: unknown);
0 commit comments