Skip to content

Commit

Permalink
refactor: use const
Browse files Browse the repository at this point in the history
  • Loading branch information
CaduGomes committed Nov 29, 2023
1 parent 8b48c3a commit ba0e2d6
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/imports/meta/buildReferences.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,12 @@ type References = {
export default function buildReferences(Meta: Record<string, MetaObjectType>) {
const References: References = {};

for (let metaName in Meta) {
for (const metaName in Meta) {
const meta = Meta[metaName];

if (meta.type !== 'document') continue;

for (let fieldName in meta.fields) {
for (const fieldName in meta.fields) {
const field = meta.fields[fieldName];
if (field.type === 'lookup' && field.document) {
References[field.document] = {
Expand All @@ -52,7 +52,7 @@ export default function buildReferences(Meta: Record<string, MetaObjectType>) {
}

if (Array.isArray(meta.relations)) {
for (let relation of meta.relations) {
for (const relation of meta.relations) {
References[relation.document] = {
...References[relation.document],
relationsFrom: {
Expand Down

0 comments on commit ba0e2d6

Please sign in to comment.