mirror of https://github.com/jetkvm/kvm.git
fix: version info not loading in feature flags and settings
The getLocalVersion() call was happening before the WebRTC RPC data channel was established, causing version fetch to fail silently. This resulted in: - Feature flags always returning false (no version = disabled) - Settings UI showing "App: Loading..." and "System: Loading..." indefinitely - Version-gated features (like HDMI Sleep Mode) never appearing Fixed by adding rpcDataChannel readyState check before calling getLocalVersion(), matching the pattern used by all other RPC calls in the same file.
This commit is contained in:
parent
c8808ee3b2
commit
8189861bfa
|
|
@ -898,10 +898,11 @@ export default function KvmIdRoute() {
|
|||
|
||||
useEffect(() => {
|
||||
if (appVersion) return;
|
||||
if (rpcDataChannel?.readyState !== "open") return;
|
||||
|
||||
getLocalVersion();
|
||||
// eslint-disable-next-line react-hooks/exhaustive-deps
|
||||
}, [appVersion]);
|
||||
}, [appVersion, rpcDataChannel?.readyState]);
|
||||
|
||||
const ConnectionStatusElement = useMemo(() => {
|
||||
const isOtherSession = location.pathname.includes("other-session");
|
||||
|
|
|
|||
Loading…
Reference in New Issue