Skip to content

Commit

Permalink
fix: ts errors
Browse files Browse the repository at this point in the history
  • Loading branch information
t-col committed Aug 15, 2024
1 parent ade7e8d commit 30cac58
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/lib/offline-api/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { omit, compact, get } from 'lodash'
import { omit, compact, get, isArray } from 'lodash'
import FieldDeletionValidator from './validator/field-deletion'
import { ContentTypePayloadValidator } from './validator/content-type'
import { TagSchemaValidator } from './validator/tag'
Expand Down Expand Up @@ -529,8 +529,8 @@ class OfflineAPI {
if (get(field, 'sys.id') === childId) {
links.push(new Link(entry, key, locale))
}
if (field instanceof Array) {
const fieldArray = field
if (isArray(field)) {
const fieldArray: any[] = field
fieldArray.forEach((fieldEntry, index) => {
if (get(fieldEntry, 'sys.id') === childId) {
links.push(new Link(entry, key, locale, index))
Expand Down

0 comments on commit 30cac58

Please sign in to comment.