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 a71b090
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 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,7 +529,7 @@ class OfflineAPI {
if (get(field, 'sys.id') === childId) {
links.push(new Link(entry, key, locale))
}
if (field instanceof Array) {
if (isArray(field)) {
const fieldArray = field
fieldArray.forEach((fieldEntry, index) => {
if (get(fieldEntry, 'sys.id') === childId) {
Expand Down

0 comments on commit a71b090

Please sign in to comment.