mirror of
https://github.com/mauriceboe/TREK.git
synced 2026-12-02 09:22:15 +00:00
fix(quality): clear the SonarQube findings on the 4.0.0 branch (#2062)
The day-swipe move handler mixed classifying the gesture with following the finger, which put it at cognitive complexity 20. The classifying half is a pure question about a gesture, so it moves out as classifyLock: null keeps waiting for the next move, dead and h end the same way they did before. Also reads the reduce-motion flag through dataset, seeds the closest-year reduce with years[0] so it cannot throw if the empty guard above it ever loosens, and compares the in-flight preview entry against undefined instead of leaning on a promise being truthy.
This commit is contained in:
@@ -545,7 +545,7 @@ export class CollabService {
|
||||
// entry yet, since the first has not answered. Joining the running fetch keeps
|
||||
// that a single outbound request instead of twenty.
|
||||
const running = this.inFlight.get(url);
|
||||
if (running) return { ...(await running), url };
|
||||
if (running !== undefined) return { ...(await running), url };
|
||||
|
||||
// Charged per outbound fetch rather than per request, which is what the
|
||||
// budget is actually protecting. Without a user there is no one to charge —
|
||||
|
||||
Reference in New Issue
Block a user