Skip to content

Commit

Permalink
feat: increase the timeout for editor entity store to avoid data loss (
Browse files Browse the repository at this point in the history
  • Loading branch information
Chaoste authored Dec 20, 2023
1 parent 1506636 commit 844a1ad
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@ import { EditorEntityStore, RequestedEntitiesMessage } from '@contentful/visual-
import type { Asset, AssetFile, Entry, UnresolvedLink } from 'contentful';
import { sendMessage } from '../../communication/sendMessage';

// The default of 3s in the EditorEntityStore is sometimes timing out and
// leads to not rendering bound content and design components.
const REQUEST_TIMEOUT = 10000;

export class EditorModeEntityStore extends EditorEntityStore {
public locale: string;

Expand Down Expand Up @@ -36,7 +40,7 @@ export class EditorModeEntityStore extends EditorEntityStore {
};
};

super({ entities, sendMessage, subscribe, locale });
super({ entities, sendMessage, subscribe, locale, timeoutDuration: REQUEST_TIMEOUT });
this.locale = locale;
}

Expand Down

0 comments on commit 844a1ad

Please sign in to comment.