mirror of
https://github.com/mauriceboe/TREK.git
synced 2026-11-30 08:30:05 +00:00
fix(client): compare the running flush with null instead of testing a promise
_flushRun holds the running pass or null. Testing it as a boolean is correct but reads like a forgotten await, and SonarCloud counts it as a reliability bug (S6544). The explicit comparison says what is meant.
This commit is contained in:
@@ -287,7 +287,7 @@ export const mutationQueue = {
|
||||
*/
|
||||
flush(): Promise<void> {
|
||||
if (isEffectivelyOffline() || !isAuthed()) return Promise.resolve()
|
||||
if (_flushRun) {
|
||||
if (_flushRun !== null) {
|
||||
_flushAgain = true
|
||||
return _flushRun
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user