Skip to content

Commit

Permalink
fix: ts errors (#1358)
Browse files Browse the repository at this point in the history
* fix: bump node in CI to fix builds

* fix: ts errors
  • Loading branch information
t-col authored Aug 15, 2024
1 parent fe8b5e7 commit b20125c
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 12 deletions.
10 changes: 5 additions & 5 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
steps:
- checkout
- node/install:
node-version: '18.15'
node-version: '18'
- node/install-packages
- run:
name: Lint
Expand All @@ -31,7 +31,7 @@ jobs:
steps:
- checkout
- node/install:
node-version: '18.15'
node-version: '18'
- node/install-packages
- run:
name: Run Unit Tests
Expand All @@ -43,7 +43,7 @@ jobs:
steps:
- checkout
- node/install:
node-version: '18.15'
node-version: '18'
- node/install-packages
- run:
name: Run Integration Tests
Expand All @@ -55,7 +55,7 @@ jobs:
steps:
- checkout
- node/install:
node-version: '18.15'
node-version: '18'
- node/install-packages
- run:
name: Run E2E Tests
Expand All @@ -67,7 +67,7 @@ jobs:
steps:
- checkout
- node/install:
node-version: '18.15'
node-version: '18'
- node/install-packages
- vault/get-secrets:
template-preset: 'semantic-release-ecosystem'
Expand Down
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
10 changes: 6 additions & 4 deletions test/setup.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,10 @@
const chai = require('chai')
const dirtyChai = require('dirty-chai')
const sinonChai = require('sinon-chai')
const chaiAsPromised = require('chai-as-promised')
const chaiAsPromised = import('chai-as-promised')

chai.use(sinonChai)
chai.use(dirtyChai)
chai.use(chaiAsPromised)
;(async () => {
chai.use(sinonChai)
chai.use(dirtyChai)
chai.use(await chaiAsPromised)
})()

0 comments on commit b20125c

Please sign in to comment.