Skip to content

Commit 8b7821e

Browse files
committed
eslint fixes
1 parent 12b105c commit 8b7821e

File tree

1 file changed

+7
-8
lines changed

1 file changed

+7
-8
lines changed

src/edit.js

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -81,18 +81,17 @@ export default function MapsBlockAppleEdit(props) {
8181
*/
8282
const checkCredentials = async () => {
8383
try {
84-
const response = await apiFetch({ path: 'MapsBlockApple/v1/GetJWT' });
85-
// If the endpoint returns a JWT, treat as authenticated.
84+
const response = await apiFetch({
85+
path: 'MapsBlockApple/v1/GetJWT',
86+
});
8687
if (response && response.jwt) {
8788
return true;
88-
} else {
89-
setIsLoading(false);
90-
updateAuthenticationStatus(false);
91-
return false;
9289
}
90+
91+
setIsLoading(false);
92+
updateAuthenticationStatus(false);
93+
return false;
9394
} catch (error) {
94-
// If the endpoint returns an error, treat as unauthenticated.
95-
console.error(error);
9695
setIsLoading(false);
9796
updateAuthenticationStatus(false);
9897
return false;

0 commit comments

Comments
 (0)