diff --git a/CHANGELOG.md b/CHANGELOG.md index 75d1430b22..06d6725ce9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,10 @@ +## [13.2.2](https://github.com/streamich/react-use/compare/v13.2.1...v13.2.2) (2019-11-06) + + +### Bug Fixes + +* **#749:** now should work with SSR ([c12976c](https://github.com/streamich/react-use/commit/c12976cad26577a4be3ac65133268f41bbdc82da)), closes [#749](https://github.com/streamich/react-use/issues/749) + ## [13.2.1](https://github.com/streamich/react-use/compare/v13.2.0...v13.2.1) (2019-11-04) diff --git a/package.json b/package.json index 624fe8abce..d5659606ed 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "react-use", - "version": "13.2.1", + "version": "13.2.2", "description": "Collection of React Hooks", "main": "lib/index.js", "module": "esm/index.js", diff --git a/src/useTitle.ts b/src/useTitle.ts index d4a096aedc..6d3af7e254 100644 --- a/src/useTitle.ts +++ b/src/useTitle.ts @@ -8,4 +8,4 @@ function useTitle(title: string) { } } -export default document ? useTitle : (_title: string) => {}; +export default typeof document !== 'undefined' ? useTitle : (_title: string) => {};