Skip to content

Commit 0545e2f

Browse files
committed
Fix subtle issue
1 parent de757ff commit 0545e2f

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

client/src/pages/SettingsPage.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ import { ServerListEditor } from "components/settings-editor/ServerListEditor";
3939
import { useOptimisticTransaction } from "hooks/useOptimistic";
4040
import { useSm } from "hooks/useSmallDisplay";
4141
import { produce } from "immer";
42-
import { findLast, keys, map, round, startCase } from "lodash-es";
42+
import { findLast, isArray, keys, map, round, startCase } from "lodash-es";
4343
import { ReactNode, Ref, useMemo, useRef, useState } from "react";
4444
import { useMeasure, useRafLoop } from "react-use";
4545
import { slice } from "slices";
@@ -251,12 +251,12 @@ export function SettingsPage({ template: Page }: PageContentProps) {
251251
formatLabel(round(Math.pow(10, v) / baseRate, 2))
252252
}
253253
valueLabelDisplay="auto"
254-
defaultValue={playbackRate}
254+
defaultValue={Math.log10(playbackRate)}
255255
onChangeCommitted={(_, v) =>
256256
slice.settings.set((f) => {
257257
f["playback/playbackRate"] = Math.pow(
258258
10,
259-
v as number,
259+
isArray(v) ? v[0] : v,
260260
);
261261
})
262262
}

0 commit comments

Comments
 (0)