@micromag/viewer 0.3.338 → 0.3.340

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/es/index.js CHANGED
@@ -2601,11 +2601,15 @@ var Viewer = function Viewer(_ref) {
2601
2601
  }
2602
2602
  }, [onEnd, changeIndex]);
2603
2603
  var gotoPreviousScreen = useCallback(function (e) {
2604
- e.stopPropagation();
2604
+ if (typeof e !== 'undefined') {
2605
+ e.stopPropagation();
2606
+ }
2605
2607
  changeIndex(Math.max(0, screenIndex - 1));
2606
2608
  }, [changeIndex, screenIndex]);
2607
2609
  var gotoNextScreen = useCallback(function (e) {
2608
- e.stopPropagation();
2610
+ if (typeof e !== 'undefined') {
2611
+ e.stopPropagation();
2612
+ }
2609
2613
  changeIndex(Math.min(screens.length - 1, screenIndex + 1));
2610
2614
  }, [changeIndex, screenIndex]);
2611
2615
  var _useState = useState(false),
package/lib/index.js CHANGED
@@ -2621,11 +2621,15 @@ var Viewer = function Viewer(_ref) {
2621
2621
  }
2622
2622
  }, [onEnd, changeIndex]);
2623
2623
  var gotoPreviousScreen = React.useCallback(function (e) {
2624
- e.stopPropagation();
2624
+ if (typeof e !== 'undefined') {
2625
+ e.stopPropagation();
2626
+ }
2625
2627
  changeIndex(Math.max(0, screenIndex - 1));
2626
2628
  }, [changeIndex, screenIndex]);
2627
2629
  var gotoNextScreen = React.useCallback(function (e) {
2628
- e.stopPropagation();
2630
+ if (typeof e !== 'undefined') {
2631
+ e.stopPropagation();
2632
+ }
2629
2633
  changeIndex(Math.min(screens.length - 1, screenIndex + 1));
2630
2634
  }, [changeIndex, screenIndex]);
2631
2635
  var _useState = React.useState(false),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@micromag/viewer",
3
- "version": "0.3.338",
3
+ "version": "0.3.340",
4
4
  "description": "",
5
5
  "keywords": [
6
6
  "javascript"
@@ -64,7 +64,7 @@
64
64
  "@micromag/element-share-options": "^0.3.332",
65
65
  "@micromag/element-webview": "^0.3.332",
66
66
  "@micromag/elements": "^0.3.336",
67
- "@micromag/fields": "^0.3.338",
67
+ "@micromag/fields": "^0.3.339",
68
68
  "@micromag/intl": "^0.3.333",
69
69
  "@micromag/screens": "^0.3.338",
70
70
  "@react-spring/core": "^9.6.1",
@@ -85,5 +85,5 @@
85
85
  "publishConfig": {
86
86
  "access": "public"
87
87
  },
88
- "gitHead": "07fe87efa3938e96be918c8e568925414232742c"
88
+ "gitHead": "994aa4b25aa2be017fb4394d933d9924516a29fb"
89
89
  }