mirror of
https://github.com/monkeytypegame/monkeytype.git
synced 2025-03-04 10:43:02 +08:00
fixed logic
This commit is contained in:
parent
f990d8432c
commit
90a0d3abca
1 changed files with 6 additions and 6 deletions
|
@ -164,6 +164,11 @@ export async function reinstate(): boolean {
|
|||
export async function refreshVisible(): Promise<void> {
|
||||
if (!rampReady) return;
|
||||
|
||||
ramp.triggerRefresh();
|
||||
}
|
||||
|
||||
export function renderResult(): void {
|
||||
if (!rampReady) return;
|
||||
if (ramp.getUnits().includes("leaderboard_atf")) {
|
||||
ramp.triggerRefresh();
|
||||
} else {
|
||||
|
@ -171,11 +176,6 @@ export async function refreshVisible(): Promise<void> {
|
|||
}
|
||||
}
|
||||
|
||||
export function renderResult(): void {
|
||||
if (!rampReady) return;
|
||||
ramp.triggerRefresh();
|
||||
}
|
||||
|
||||
export function setMobile(tf: boolean): void {
|
||||
if (!rampReady) return;
|
||||
ramp.setMobile(tf);
|
||||
|
@ -185,7 +185,7 @@ let showSky = false;
|
|||
|
||||
export function updateSky(visible: boolean): void {
|
||||
showSky = visible;
|
||||
if (showSky && !ramp.getUnits().includes("sky_atf")) {
|
||||
if (showSky && ramp && !ramp.getUnits().includes("sky_atf")) {
|
||||
ramp.addUnits(getUnits()).then(() => {
|
||||
ramp.displayUnits();
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue