react-custom-share
Advanced tools
Comparing version 0.4.5 to 0.4.6
@@ -135,6 +135,8 @@ 'use strict'; | ||
value: function componentDidMount() { | ||
this.setupObserver(); | ||
this.setFixedButtonsTranslation(); | ||
if (typeof window !== 'undefined') { | ||
this.setupObserver(); | ||
this.setFixedButtonsTranslation(); | ||
window.addEventListener('resize', (0, _lodash2.default)(this.setFixedButtonsTranslation, this.props.debounce), false); | ||
window.addEventListener('resize', (0, _lodash2.default)(this.setFixedButtonsTranslation, this.props.debounce), false); | ||
} | ||
} | ||
@@ -145,23 +147,25 @@ }, { | ||
// unobserve the targets | ||
var _iteratorNormalCompletion2 = true; | ||
var _didIteratorError2 = false; | ||
var _iteratorError2 = undefined; | ||
if (typeof window !== 'undefined') { | ||
var _iteratorNormalCompletion2 = true; | ||
var _didIteratorError2 = false; | ||
var _iteratorError2 = undefined; | ||
try { | ||
for (var _iterator2 = this.observerTargets[Symbol.iterator](), _step2; !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done); _iteratorNormalCompletion2 = true) { | ||
var value = _step2.value; | ||
try { | ||
for (var _iterator2 = this.observerTargets[Symbol.iterator](), _step2; !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done); _iteratorNormalCompletion2 = true) { | ||
var value = _step2.value; | ||
this.observer.unobserve(value); | ||
} | ||
} catch (err) { | ||
_didIteratorError2 = true; | ||
_iteratorError2 = err; | ||
} finally { | ||
try { | ||
if (!_iteratorNormalCompletion2 && _iterator2.return) { | ||
_iterator2.return(); | ||
this.observer.unobserve(value); | ||
} | ||
} catch (err) { | ||
_didIteratorError2 = true; | ||
_iteratorError2 = err; | ||
} finally { | ||
if (_didIteratorError2) { | ||
throw _iteratorError2; | ||
try { | ||
if (!_iteratorNormalCompletion2 && _iterator2.return) { | ||
_iterator2.return(); | ||
} | ||
} finally { | ||
if (_didIteratorError2) { | ||
throw _iteratorError2; | ||
} | ||
} | ||
@@ -168,0 +172,0 @@ } |
{ | ||
"name": "react-custom-share", | ||
"version": "0.4.5", | ||
"version": "0.4.6", | ||
"description": "Social sharing buttons for React", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
64283
847