chore: add timeout mechanism for fetch calls (#3649)

This commit is contained in:
Kunal Kundu
2020-05-12 19:21:13 +05:30
committed by GitHub
parent 334304ed52
commit 3e34e52440
11 changed files with 66 additions and 28 deletions

View File

@ -1,6 +1,9 @@
import _ from 'lodash';
import { createEntry } from 'ValueObjects/Entry';
import { selectEntrySlug } from 'Reducers/collections';
import { unsentRequest } from 'netlify-cms-lib-util';
const { fetchWithTimeout: fetch } = unsentRequest;
function getSlug(path) {
return path

View File

@ -1,5 +1,8 @@
import { pickBy, trimEnd } from 'lodash';
import { addParams } from 'Lib/urlHelper';
import { unsentRequest } from 'netlify-cms-lib-util';
const { fetchWithTimeout: fetch } = unsentRequest;
export default class AssetStore {
constructor(config, getToken) {