@micromag/core 0.4.42 → 0.4.44

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/contexts.js CHANGED
@@ -1027,16 +1027,16 @@ var usePlaybackMediaRef = function usePlaybackMediaRef() {
1027
1027
  useEffect(function () {
1028
1028
  return function () {
1029
1029
  if (active) {
1030
- console.log('clear media');
1030
+ console.log('clear register media');
1031
1031
  setMedia(null);
1032
1032
  setIsBackground(false);
1033
1033
  }
1034
1034
  };
1035
- }, [active, setMedia, setIsBackground]);
1035
+ }, [active, setMedia, setIsBackground, updateKey]);
1036
1036
 
1037
1037
  // Register media with context when active and no media is registered
1038
1038
  useEffect(function () {
1039
- console.log('try to register media');
1039
+ console.log('try to register media', active, mediaRef.current, media, updateKey);
1040
1040
  if (!active || mediaRef.current === null || media !== null) {
1041
1041
  return;
1042
1042
  }
package/lib/contexts.js CHANGED
@@ -1027,16 +1027,16 @@ var usePlaybackMediaRef = function usePlaybackMediaRef() {
1027
1027
  React.useEffect(function () {
1028
1028
  return function () {
1029
1029
  if (active) {
1030
- console.log('clear media');
1030
+ console.log('clear register media');
1031
1031
  setMedia(null);
1032
1032
  setIsBackground(false);
1033
1033
  }
1034
1034
  };
1035
- }, [active, setMedia, setIsBackground]);
1035
+ }, [active, setMedia, setIsBackground, updateKey]);
1036
1036
 
1037
1037
  // Register media with context when active and no media is registered
1038
1038
  React.useEffect(function () {
1039
- console.log('try to register media');
1039
+ console.log('try to register media', active, mediaRef.current, media, updateKey);
1040
1040
  if (!active || mediaRef.current === null || media !== null) {
1041
1041
  return;
1042
1042
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@micromag/core",
3
- "version": "0.4.42",
3
+ "version": "0.4.44",
4
4
  "private": false,
5
5
  "description": "",
6
6
  "keywords": [
@@ -161,6 +161,6 @@
161
161
  "access": "public",
162
162
  "registry": "https://registry.npmjs.org/"
163
163
  },
164
- "gitHead": "6fd96aeb9ef1857c731917d8b7cde23d31b39574",
164
+ "gitHead": "53a3c8f40a4fd514b47463d697cfbe3d5a8b86cc",
165
165
  "types": "es/index.d.ts"
166
166
  }