mirror of
https://github.com/PeWu/topola-viewer.git
synced 2026-08-03 17:41:48 +00:00
Improve code quality
Fix lint warnings
This commit is contained in:
@@ -42,7 +42,9 @@ export async function getChangelog(maxVersions: number, seenVersion?: string) {
|
||||
|
||||
/** Stores in local storage the current app version as the last seen version. */
|
||||
export function updateSeenVersion() {
|
||||
localStorage.setItem(LAST_SEEN_VERSION_KEY, import.meta.env.VITE_GIT_TIME!);
|
||||
if (import.meta.env.VITE_GIT_TIME) {
|
||||
localStorage.setItem(LAST_SEEN_VERSION_KEY, import.meta.env.VITE_GIT_TIME);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -56,8 +58,8 @@ export function Changelog() {
|
||||
useEffect(() => {
|
||||
(async () => {
|
||||
const seenVersion = localStorage.getItem(LAST_SEEN_VERSION_KEY);
|
||||
const currentVersion = import.meta.env.VITE_GIT_TIME!;
|
||||
if (!seenVersion || seenVersion === currentVersion) {
|
||||
const currentVersion = import.meta.env.VITE_GIT_TIME;
|
||||
if (!seenVersion || !currentVersion || seenVersion === currentVersion) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user