@steroidsjs/core 3.0.0-beta.52 → 3.0.0-beta.53

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@steroidsjs/core",
3
- "version": "3.0.0-beta.52",
3
+ "version": "3.0.0-beta.53",
4
4
  "description": "",
5
5
  "author": "Vladimir Kozhin <hello@kozhindev.com>",
6
6
  "repository": {
@@ -79,6 +79,9 @@ function Tooltip(props) {
79
79
  // Основная функция расчета позиции
80
80
  var calculatePosition = (0, react_1.useCallback)(function (tooltipSize, arrowSize) {
81
81
  var result = (0, calculate_1["default"])(props.gap, positionRef.current, childRef.current, tooltipSize, arrowSize);
82
+ if (!result) {
83
+ return;
84
+ }
82
85
  positionRef.current = result.position;
83
86
  setStyle(result.style);
84
87
  if (result.arrowPosition) {
@@ -1,6 +1,9 @@
1
1
  "use strict";
2
2
  exports.__esModule = true;
3
3
  function calculate(gap, position, parentRef, tooltipSize, arrowSize) {
4
+ if (process.env.IS_SSR) {
5
+ return null;
6
+ }
4
7
  var style = { left: null, right: null, top: null };
5
8
  var arrowPosition = null;
6
9
  var _a = parentRef.getBoundingClientRect(), top = _a.top, right = _a.right, left = _a.left, width = _a.width, height = _a.height;