mirror of
https://github.com/SableClient/Sable.git
synced 2026-12-05 16:22:26 -08:00
fix: resolve lint shadowing warning and typecheck types
This commit is contained in:
1 parent
ab44c51cdf
commit
ac8e1fd6cb
1 file changed
+5
-3
@@ -109,6 +109,7 @@ import { loadImageElementFromMediaUrl } from '$utils/dom';
|
||||
import { safeFile } from '$utils/mimeTypes';
|
||||
import { fulfilledPromiseSettledResult } from '$utils/common';
|
||||
import { useSetting } from '$state/hooks/settings';
|
||||
import type { EditorButtonId } from '$state/settings';
|
||||
import { settingsAtom } from '$state/settings';
|
||||
import { matchesShortcut } from '../../keyboard/shortcuts';
|
||||
import {
|
||||
@@ -2352,9 +2353,10 @@ export const RoomInput = forwardRef<HTMLDivElement, RoomInputProps>(
|
||||
};
|
||||
for (let i = editorButtonOrder.length - 1; i >= 0; i--) {
|
||||
const id = editorButtonOrder[i];
|
||||
const ref = buttonRefs[id];
|
||||
if (ref?.current) {
|
||||
return ref.current.getBoundingClientRect();
|
||||
if (!id) continue;
|
||||
const btnRef = buttonRefs[id];
|
||||
if (btnRef?.current) {
|
||||
return btnRef.current.getBoundingClientRect();
|
||||
}
|
||||
}
|
||||
return undefined;
|
||||
|
||||
Reference in new issue
Block a user