Skip to content

Commit

Permalink
fix: remove attempt to get a more comprehensive error
Browse files Browse the repository at this point in the history
  • Loading branch information
martinjagodic committed Aug 27, 2024
1 parent 64d91b8 commit 926203f
Showing 1 changed file with 2 additions and 2 deletions.
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

0 comments on commit 926203f

Please sign in to comment.