@micromag/core 0.4.42 → 0.4.43
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 +2 -1
- package/lib/contexts.js +2 -1
- package/package.json +2 -2
package/es/contexts.js
CHANGED
|
@@ -1036,7 +1036,7 @@ var usePlaybackMediaRef = function usePlaybackMediaRef() {
|
|
|
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);
|
|
1040
1040
|
if (!active || mediaRef.current === null || media !== null) {
|
|
1041
1041
|
return;
|
|
1042
1042
|
}
|
|
@@ -1044,6 +1044,7 @@ var usePlaybackMediaRef = function usePlaybackMediaRef() {
|
|
|
1044
1044
|
setIsBackground(background);
|
|
1045
1045
|
setMedia(mediaRef.current);
|
|
1046
1046
|
}, [active, background, media, updateKey, setMedia, setIsBackground]);
|
|
1047
|
+
console.log('usePlaybackMediaRef', mediaRef.current, media);
|
|
1047
1048
|
return {
|
|
1048
1049
|
ref: mediaRef,
|
|
1049
1050
|
isCurrent: mediaRef.current === media
|
package/lib/contexts.js
CHANGED
|
@@ -1036,7 +1036,7 @@ var usePlaybackMediaRef = function usePlaybackMediaRef() {
|
|
|
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);
|
|
1040
1040
|
if (!active || mediaRef.current === null || media !== null) {
|
|
1041
1041
|
return;
|
|
1042
1042
|
}
|
|
@@ -1044,6 +1044,7 @@ var usePlaybackMediaRef = function usePlaybackMediaRef() {
|
|
|
1044
1044
|
setIsBackground(background);
|
|
1045
1045
|
setMedia(mediaRef.current);
|
|
1046
1046
|
}, [active, background, media, updateKey, setMedia, setIsBackground]);
|
|
1047
|
+
console.log('usePlaybackMediaRef', mediaRef.current, media);
|
|
1047
1048
|
return {
|
|
1048
1049
|
ref: mediaRef,
|
|
1049
1050
|
isCurrent: mediaRef.current === media
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@micromag/core",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.43",
|
|
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": "
|
|
164
|
+
"gitHead": "e168b7a9990472d1cb36973e4e45334f16bbeba6",
|
|
165
165
|
"types": "es/index.d.ts"
|
|
166
166
|
}
|