特定条件でクラッシュするバグを修正
This commit is contained in:
parent
6c3b186c9b
commit
049b138ca5
@ -666,7 +666,7 @@ export const EachTrainInfo = ({
|
|||||||
>
|
>
|
||||||
<Text style={{ fontSize: 20 }}>{station}</Text>
|
<Text style={{ fontSize: 20 }}>{station}</Text>
|
||||||
<View style={{ flex: 1 }} />
|
<View style={{ flex: 1 }} />
|
||||||
{points.findIndex((d) => d == index) >= 0 ? (
|
{points && points.findIndex((d) => d == index) >= 0 ? (
|
||||||
<Text
|
<Text
|
||||||
style={{
|
style={{
|
||||||
fontSize: 20,
|
fontSize: 20,
|
||||||
|
@ -10,12 +10,12 @@ export default function Setting(props) {
|
|||||||
const {
|
const {
|
||||||
navigation: { navigate },
|
navigation: { navigate },
|
||||||
} = props;
|
} = props;
|
||||||
const [iconSetting, setIconSetting] = useState(undefined);
|
const [iconSetting, setIconSetting] = useState(false);
|
||||||
const [mapSwitch, setMapSwitch] = useState(undefined);
|
const [mapSwitch, setMapSwitch] = useState(false);
|
||||||
const [stationMenu, setStationMenu] = useState(undefined);
|
const [stationMenu, setStationMenu] = useState(false);
|
||||||
const [usePDFView, setUsePDFView] = useState(undefined);
|
const [usePDFView, setUsePDFView] = useState(false);
|
||||||
const [trainMenu, setTrainMenu] = useState(undefined);
|
const [trainMenu, setTrainMenu] = useState(false);
|
||||||
const [trainPosition, setTrainPosition] = useState(undefined);
|
const [trainPosition, setTrainPosition] = useState(false);
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
AS.getItem("iconSwitch").then(setIconSetting);
|
AS.getItem("iconSwitch").then(setIconSetting);
|
||||||
AS.getItem("mapSwitch").then(setMapSwitch);
|
AS.getItem("mapSwitch").then(setMapSwitch);
|
||||||
|
Loading…
Reference in New Issue
Block a user