Fix the small mechanical rules. [skip build]
This commit is contained in:
@@ -184,11 +184,12 @@ function AndroidPushNotifications() {
|
||||
const refresh = useCallback(async () => {
|
||||
setLoading(true);
|
||||
const s = await getBackgroundSyncStatus();
|
||||
const distributors = Array.isArray(s?.distributors)
|
||||
? s.distributors
|
||||
: typeof s?.distributors === 'string' && s.distributors && s.distributors !== '[]'
|
||||
? [s.distributors]
|
||||
: [];
|
||||
let distributors: string[] = [];
|
||||
if (Array.isArray(s?.distributors)) {
|
||||
distributors = s.distributors;
|
||||
} else if (typeof s?.distributors === 'string' && s.distributors && s.distributors !== '[]') {
|
||||
distributors = [s.distributors];
|
||||
}
|
||||
setStatus(
|
||||
s
|
||||
? {
|
||||
@@ -205,7 +206,7 @@ function AndroidPushNotifications() {
|
||||
}, []);
|
||||
|
||||
useEffect(() => {
|
||||
void refresh();
|
||||
refresh();
|
||||
}, [refresh]);
|
||||
|
||||
const [resetState, reset] = useAsyncCallback(
|
||||
|
||||
Reference in New Issue
Block a user