Skip to content

Commit

Permalink
test: WriteClient.migrateUpdateDocuments
Browse files Browse the repository at this point in the history
  • Loading branch information
lihbr committed Sep 6, 2024
1 parent e92f1a6 commit 580f2f1
Show file tree
Hide file tree
Showing 14 changed files with 4,821 additions and 837 deletions.
8 changes: 4 additions & 4 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@
"imgix-url-builder": "^0.0.5"
},
"devDependencies": {
"@prismicio/mock": "^0.3.8",
"@prismicio/mock": "^0.3.9",
"@prismicio/types-internal": "^2.6.0",
"@size-limit/preset-small-lib": "^11.1.4",
"@trivago/prettier-plugin-sort-imports": "^4.3.0",
Expand Down
9 changes: 1 addition & 8 deletions src/lib/isMigrationField.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@ import type { RichTextField } from "../types/value/richText"
import type { SliceZone } from "../types/value/sliceZone"
import type { AnyRegularField } from "../types/value/types"

import * as isFilled from "../helpers/isFilled"

/**
* Checks if a field is a slice zone.
*
Expand Down Expand Up @@ -149,12 +147,7 @@ export const image = (
) {
// Migration image field
return true
} else if (
"id" in field &&
"dimensions" in field &&
field.dimensions &&
isFilled.image(field)
) {
} else if ("id" in field && "url" in field && "dimensions" in field) {
// Regular image field
return true
}
Expand Down
Loading

0 comments on commit 580f2f1

Please sign in to comment.