diff --git a/client/components/ContentLists/Manual/Manual.jsx b/client/components/ContentLists/Manual/Manual.jsx index ee09b44..8e0f5af 100644 --- a/client/components/ContentLists/Manual/Manual.jsx +++ b/client/components/ContentLists/Manual/Manual.jsx @@ -339,14 +339,19 @@ class Manual extends React.Component { ); } - const article = await this.props.publisher.getArticleByCode(code); - if (article) { - console.warn('Article added to the content list successfully.', article); - return article.id; + try { + const article = await this.props.publisher.getArticleByCode(code + '123'); + if (article) { + console.warn('Article added to the content list successfully.', article); + return article.id; + } + } catch (error) { + console.error('Error fetching article:', error); } await new Promise(resolve => setTimeout(resolve, 3000)); // Wait for 3 seconds - return attemptFetch(tries - 1); + + return this.attemptFetch(tries - 1, code); }; handleSourceChange = (source) => {