@folklore/hooks 0.0.36 → 0.0.38
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/dist/cjs.js +3 -0
- package/dist/es.js +3 -0
- package/package.json +2 -2
package/dist/cjs.js
CHANGED
|
@@ -1400,6 +1400,9 @@ function useYouTubePlayer(id) {
|
|
|
1400
1400
|
const elementRef = react.useRef(null);
|
|
1401
1401
|
const playerRef = react.useRef(null);
|
|
1402
1402
|
const playerElementRef = react.useRef(elementRef.current);
|
|
1403
|
+
if (elementRef.current !== null && playerElementRef.current === null) {
|
|
1404
|
+
playerElementRef.current = elementRef.current;
|
|
1405
|
+
}
|
|
1403
1406
|
const elementHasChanged = elementRef.current !== playerElementRef.current;
|
|
1404
1407
|
const videoId = react.useMemo(() => getVideoId(id), [id]);
|
|
1405
1408
|
const [ready, setReady] = react.useState(false);
|
package/dist/es.js
CHANGED
|
@@ -1389,6 +1389,9 @@ function useYouTubePlayer(id) {
|
|
|
1389
1389
|
const elementRef = useRef(null);
|
|
1390
1390
|
const playerRef = useRef(null);
|
|
1391
1391
|
const playerElementRef = useRef(elementRef.current);
|
|
1392
|
+
if (elementRef.current !== null && playerElementRef.current === null) {
|
|
1393
|
+
playerElementRef.current = elementRef.current;
|
|
1394
|
+
}
|
|
1392
1395
|
const elementHasChanged = elementRef.current !== playerElementRef.current;
|
|
1393
1396
|
const videoId = useMemo(() => getVideoId(id), [id]);
|
|
1394
1397
|
const [ready, setReady] = useState(false);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@folklore/hooks",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.38",
|
|
4
4
|
"description": "React hooks",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"javascript",
|
|
@@ -49,7 +49,7 @@
|
|
|
49
49
|
"publishConfig": {
|
|
50
50
|
"access": "public"
|
|
51
51
|
},
|
|
52
|
-
"gitHead": "
|
|
52
|
+
"gitHead": "b086529f761e895ed21a5a26a02f5b1902103fc2",
|
|
53
53
|
"dependencies": {
|
|
54
54
|
"@folklore/events": "^0.0.5",
|
|
55
55
|
"@folklore/services": "^0.1.38",
|