Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: remove attempt to get a more comprehensive error #7270

Open
wants to merge 12 commits into
base: main
Choose a base branch
from
4 changes: 2 additions & 2 deletions packages/decap-cms-core/src/backend.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { attempt, flatten, isError, uniq, trim, sortBy, get, set } from 'lodash';
import { flatten, isError, uniq, trim, sortBy, get, set } from 'lodash';
import { List, fromJS, Set } from 'immutable';
import * as fuzzy from 'fuzzy';
import {
Expand Down Expand Up @@ -869,7 +869,7 @@ export class Backend {
return (entry: EntryValue): EntryValue => {
const format = resolveFormat(collection, entry);
if (entry && entry.raw !== undefined) {
const data = (format && attempt(format.fromFile.bind(format, entry.raw))) || {};
const data = (format && format.fromFile.bind(format, entry.raw)()) || {};
if (isError(data)) console.error(data);
return Object.assign(entry, { data: isError(data) ? {} : data });
}
Expand Down
Loading