Resolve no-named-as-default-member JS lint warnings (#40685)

This commit is contained in:
Matt Jankowski
2026-09-24 15:29:22 +00:00
committed by GitHub
parent d7bfa8613b
commit 6d9ddf490d
2 changed files with 5 additions and 5 deletions

View File

@@ -1,6 +1,6 @@
import { defineMessages } from 'react-intl';
import axios from 'axios';
import { isCancel } from 'axios';
import { throttle } from 'lodash';
import api from '@/mastodon/api';
@@ -567,7 +567,7 @@ const fetchComposeSuggestionsAccounts = throttle((dispatch, token) => {
dispatch(importFetchedAccounts(response.data));
dispatch(readyComposeSuggestionsAccounts(token, response.data));
}).catch(error => {
if (!axios.isCancel(error)) {
if (!isCancel(error)) {
dispatch(showAlertForError(error));
}
}).finally(() => {
@@ -617,7 +617,7 @@ const fetchComposeSuggestionsTags = throttle((dispatch, token) => {
}).then(({ data }) => {
dispatch(readyComposeSuggestionsTags(token, data.hashtags));
}).catch(error => {
if (!axios.isCancel(error)) {
if (!isCancel(error)) {
dispatch(showAlertForError(error));
}
}).finally(() => {

View File

@@ -4,7 +4,7 @@ import type {
Method,
RawAxiosRequestHeaders,
} from 'axios';
import axios from 'axios';
import { create as createAxiosInstance } from 'axios';
import LinkHeader from 'http-link-header';
import { getAccessToken } from './initial_state';
@@ -90,7 +90,7 @@ const authorizationTokenFromInitialState = (): RawAxiosRequestHeaders => {
// eslint-disable-next-line import/no-default-export
export default function api(withAuthorization = true) {
const instance = axios.create({
const instance = createAxiosInstance({
transitional: {
clarifyTimeoutError: true,
},