Skip to content

Commit

Permalink
prettier
Browse files Browse the repository at this point in the history
  • Loading branch information
smashercosmo committed Dec 29, 2020
1 parent beaf7d2 commit afa5d71
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions packages/netlify-cms-core/src/lib/fieldsUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,15 +69,15 @@ export const selectInferredField = (
if (!fields || !inferableField) return null;
// Try to return a field of the specified type with one of the synonyms
const mainTypeFields = fields
.filter(f => (f.widget || 'string') === inferableField.type)
.map(f => f.name);
.filter(f => (f.widget || 'string') === inferableField.type)
.map(f => f.name);
field = mainTypeFields.filter(f => inferableField.synonyms.indexOf(f) !== -1);
if (field && field.length > 0) return field[0];

// Try to return a field for each of the specified secondary types
const secondaryTypeFields = fields
.filter(f => inferableField.secondaryTypes.indexOf(f.widget || 'string') !== -1)
.map(f => f.name);
.filter(f => inferableField.secondaryTypes.indexOf(f.widget || 'string') !== -1)
.map(f => f.name);
field = secondaryTypeFields.filter(f => inferableField.synonyms.indexOf(f) !== -1);
if (field && field.length > 0) return field[0];

Expand Down
2 changes: 1 addition & 1 deletion packages/netlify-cms-core/src/types/global.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@ import { CmsConfig } from './redux';
declare global {
interface Window {
CMS_CONFIG?: CmsConfig;
CMS_ENV?: string
CMS_ENV?: string;
}
}

0 comments on commit afa5d71

Please sign in to comment.