@xtia/jel 0.11.0 → 0.11.1

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.
@@ -456,10 +456,9 @@ export const animationFrames = (() => {
456
456
  let rafId = null;
457
457
  let lastTime = null;
458
458
  const frame = (time) => {
459
- if (lastTime === null)
460
- lastTime = time;
461
459
  rafId = requestAnimationFrame(frame);
462
- const elapsed = time - lastTime;
460
+ const elapsed = time - (lastTime !== null && lastTime !== void 0 ? lastTime : time);
461
+ lastTime = time;
463
462
  emit(elapsed);
464
463
  };
465
464
  rafId = requestAnimationFrame(frame);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xtia/jel",
3
- "version": "0.11.0",
3
+ "version": "0.11.1",
4
4
  "repository": {
5
5
  "url": "https://github.com/tiadrop/jel-ts",
6
6
  "type": "github"