fix: changelog fetching empty markdown file

This commit is contained in:
Kentai Radiquum 2024-08-12 03:32:17 +05:00
parent 8bcd548ae3
commit 285f084acb
Signed by: Radiquum
GPG key ID: 858E8EE696525EED
2 changed files with 6 additions and 5 deletions

View file

@ -26,7 +26,6 @@ export const App = (props) => {
setCurrentVersion(data.version); setCurrentVersion(data.version);
setPreviousVersions(data.previous); setPreviousVersions(data.previous);
} }
console.log(data.version, preferencesStore.params.version);
} }
useEffect(() => { useEffect(() => {
if (preferencesStore._hasHydrated) { if (preferencesStore._hasHydrated) {

View file

@ -20,9 +20,11 @@ export const ChangelogModal = (props: {
>({}); >({});
useEffect(() => { useEffect(() => {
_fetchVersionChangelog(props.version).then((data) => { if (props.version) {
setCurrentVersionChangelog(data); _fetchVersionChangelog(props.version).then((data) => {
}); setCurrentVersionChangelog(data);
});
}
if (props.previousVersions.length > 0) { if (props.previousVersions.length > 0) {
props.previousVersions.forEach((version) => { props.previousVersions.forEach((version) => {
@ -36,7 +38,7 @@ export const ChangelogModal = (props: {
}); });
}); });
} }
}, [props.isOpen]); }, []);
return ( return (
<Modal <Modal