@pareto-engineering/design-system 2.0.0-alpha.36 → 2.0.0-alpha.37

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -37,10 +37,9 @@ var SocialMediaShareButton = _ref => {
37
37
  (0, React.useLayoutEffect)(() => {
38
38
  Promise.resolve().then(() => _interopRequireWildcard(require("./styles.scss")));
39
39
  }, []);
40
- var {
41
- title
42
- } = document;
43
- var link = window.location.href;
40
+ var isServer = typeof window === 'undefined';
41
+ var title = isServer ? '' : document.title;
42
+ var link = isServer ? '' : window.location.href;
44
43
  var defaultsMap = {
45
44
  facebook: {
46
45
  icon: 'f',
@@ -22,10 +22,9 @@ const SocialMediaShareButton = ({
22
22
  useLayoutEffect(() => {
23
23
  import("./styles.scss");
24
24
  }, []);
25
- const {
26
- title
27
- } = document;
28
- const link = window.location.href;
25
+ const isServer = typeof window === 'undefined';
26
+ const title = isServer ? '' : document.title;
27
+ const link = isServer ? '' : window.location.href;
29
28
  const defaultsMap = {
30
29
  facebook: {
31
30
  icon: 'f',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pareto-engineering/design-system",
3
- "version": "2.0.0-alpha.36",
3
+ "version": "2.0.0-alpha.37",
4
4
  "description": "",
5
5
  "main": "dist/cjs/index.js",
6
6
  "module": "dist/es/index.js",
@@ -29,8 +29,10 @@ const SocialMediaShareButton = ({
29
29
  import('./styles.scss')
30
30
  }, [])
31
31
 
32
- const { title } = document
33
- const link = window.location.href
32
+ const isServer = typeof window === 'undefined'
33
+
34
+ const title = isServer ? '' : document.title
35
+ const link = isServer ? '' : window.location.href
34
36
 
35
37
  const defaultsMap = {
36
38
  facebook:{