mirror of
https://github.com/movie-web/native-app.git
synced 2025-09-13 16:53:25 +00:00
fix: router.replace() throws exception
This commit is contained in:
@@ -84,7 +84,7 @@ function LoadingScreen({
|
|||||||
const initialize = async () => {
|
const initialize = async () => {
|
||||||
const video = await fetchVideo();
|
const video = await fetchVideo();
|
||||||
if (!video || !data) {
|
if (!video || !data) {
|
||||||
return router.push({ pathname: "/(tabs)" });
|
return router.back();
|
||||||
}
|
}
|
||||||
|
|
||||||
const videoPlayerData: VideoPlayerData = {
|
const videoPlayerData: VideoPlayerData = {
|
||||||
|
@@ -44,7 +44,7 @@ export const SourceSelector = () => {
|
|||||||
title={source.name}
|
title={source.name}
|
||||||
onPress={() => {
|
onPress={() => {
|
||||||
off();
|
off();
|
||||||
router.replace({
|
router.push({
|
||||||
pathname: "/videoPlayer/loading",
|
pathname: "/videoPlayer/loading",
|
||||||
params: { sourceID: source.id, data: JSON.stringify(data) },
|
params: { sourceID: source.id, data: JSON.stringify(data) },
|
||||||
});
|
});
|
||||||
|
Reference in New Issue
Block a user