mirror of
https://github.com/streamyfin/streamyfin.git
synced 2026-07-08 21:42:52 +01:00
fix: error race conditions
This commit is contained in:
@@ -158,7 +158,7 @@ export default function page() {
|
|||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
const fetchStreamData = async () => {
|
const fetchStreamData = async () => {
|
||||||
setItemStatus({ isLoading: true, isError: false });
|
setStreamStatus({ isLoading: true, isError: false });
|
||||||
const native = await generateDeviceProfile();
|
const native = await generateDeviceProfile();
|
||||||
try {
|
try {
|
||||||
let result: Stream | null = null;
|
let result: Stream | null = null;
|
||||||
@@ -414,7 +414,7 @@ export default function page() {
|
|||||||
return () => setIsMounted(false);
|
return () => setIsMounted(false);
|
||||||
}, []);
|
}, []);
|
||||||
|
|
||||||
if (itemStatus.isLoading || streamStatus.isLoading || !item || !stream) {
|
if (itemStatus.isLoading || streamStatus.isLoading) {
|
||||||
return (
|
return (
|
||||||
<View className='w-screen h-screen flex flex-col items-center justify-center bg-black'>
|
<View className='w-screen h-screen flex flex-col items-center justify-center bg-black'>
|
||||||
<Loader />
|
<Loader />
|
||||||
|
|||||||
Reference in New Issue
Block a user