@neovici/cosmoz-omnitable 12.26.1 → 12.26.3

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.
@@ -10,12 +10,12 @@ export const isCloseEnough = (a = 0, b = 0) => Math.abs(a - b) < 0.1,
10
10
  }),
11
11
  [tween, setTween] = useState(target),
12
12
  animate = useCallback(() => {
13
- state.current.request = requestAnimationFrame(animate);
14
-
15
13
  if (!state.current.running) {
16
14
  return;
17
15
  }
18
16
 
17
+ state.current.request = requestAnimationFrame(animate);
18
+
19
19
  setTween((tween) => {
20
20
  const target = state.current.target;
21
21
 
@@ -28,7 +28,7 @@ export const isCloseEnough = (a = 0, b = 0) => Math.abs(a - b) < 0.1,
28
28
  isCloseEnough(tween[idx], t)
29
29
  ? t
30
30
  : (tween[idx] ?? 0) +
31
- ((t ?? 0) - (tween[idx] ?? 0)) / speedFactor || 0
31
+ ((t ?? 0) - (tween[idx] ?? 0)) / speedFactor || 0,
32
32
  );
33
33
  });
34
34
  }, []);
@@ -42,8 +42,13 @@ export const isCloseEnough = (a = 0, b = 0) => Math.abs(a - b) < 0.1,
42
42
  if (state.current.target.length === 0 && target.length > 0) {
43
43
  setTween(target);
44
44
  }
45
+
45
46
  state.current.target = target;
47
+
48
+ if (state.current.running) return;
49
+
46
50
  state.current.running = true;
51
+ state.current.request = requestAnimationFrame(animate);
47
52
  }, [target]);
48
53
 
49
54
  return tween;
package/lib/utils-date.js CHANGED
@@ -187,6 +187,9 @@ export const
187
187
  return '';
188
188
  }
189
189
  const localDate = toDate(toLocalISOString(date));
190
+ if (!localDate) {
191
+ return '';
192
+ }
190
193
  localDate.setHours(0, 0, 0, 0);
191
194
  return localDate;
192
195
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@neovici/cosmoz-omnitable",
3
- "version": "12.26.1",
3
+ "version": "12.26.3",
4
4
  "description": "[![Build Status](https://travis-ci.org/Neovici/cosmoz-omnitable.svg?branch=master)](https://travis-ci.org/Neovici/cosmoz-omnitable)",
5
5
  "keywords": [
6
6
  "web-components"