mirror of
https://github.com/zhom/donutbrowser.git
synced 2026-09-20 00:22:26 +02:00
refactor: cleanup
This commit is contained in:
@@ -120,7 +120,6 @@ export function WayfernConfigForm({
|
||||
result.identity_id ? undefined : result.fingerprint,
|
||||
);
|
||||
onConfigChange("identity_overrides", undefined);
|
||||
onConfigChange("identity_baseline", undefined);
|
||||
} catch (error) {
|
||||
console.error("Failed to generate fingerprint:", error);
|
||||
} finally {
|
||||
|
||||
@@ -74,14 +74,10 @@ export function useGroupEvents() {
|
||||
|
||||
void setupListeners();
|
||||
|
||||
// Cleanup listeners on unmount.
|
||||
// NOTE: the previous version stored both unlisten fns by reassigning
|
||||
// `groupsUnlisten` to a wrapper that called itself, which produced a
|
||||
// `Maximum call stack size exceeded` crash whenever this effect tore
|
||||
// down. React's reconciler then bailed out mid-commit and left stale
|
||||
// overlay nodes in the DOM, blocking every subsequent click in the
|
||||
// window. Holding the two unlisten fns in separate locals avoids both
|
||||
// problems.
|
||||
// Cleanup listeners on unmount. The two unlisten fns stay in separate
|
||||
// locals: merging them into one wrapper that reassigns the local it then
|
||||
// calls makes that wrapper call itself, and the stack overflow aborts the
|
||||
// teardown mid-commit, leaving stale overlay nodes that swallow clicks.
|
||||
return () => {
|
||||
if (groupsUnlisten) groupsUnlisten();
|
||||
if (profilesUnlisten) profilesUnlisten();
|
||||
|
||||
@@ -414,7 +414,6 @@ export interface WayfernConfig {
|
||||
os?: WayfernOS; // Operating system for fingerprint generation
|
||||
geo_proxy_signature?: string; // Internal: routing the fingerprint's location was computed for
|
||||
identity_id?: string; // Internal: UUID the device is derived from on browsers with the identity API
|
||||
identity_baseline?: string; // Legacy: read once by the migration to identity-only storage, never written
|
||||
identity_overrides?: string; // JSON object of the user's own edits to an identity-backed device
|
||||
location?: string; // JSON object of the exit-derived location fields (timezone, language, coordinates)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user