mirror of
https://github.com/mastodon/mastodon.git
synced 2026-09-30 05:27:09 -05:00
Resolve no-named-as-default-member JS lint warnings (#40685)
This commit is contained in:
@@ -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(() => {
|
||||
|
||||
@@ -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,
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user