sanity-plugin-internationalized-array 1.10.2 → 1.10.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sanity-plugin-internationalized-array",
3
- "version": "1.10.2",
3
+ "version": "1.10.4",
4
4
  "description": "Store localized fields in an array to save on attributes",
5
5
  "keywords": [
6
6
  "sanity",
@@ -88,7 +88,7 @@
88
88
  "typescript": "^4.9.5"
89
89
  },
90
90
  "peerDependencies": {
91
- "@sanity/ui": "^1.2.2",
91
+ "@sanity/ui": "^1.2.2 || ^2.0.0",
92
92
  "react": "^18",
93
93
  "sanity": "^3.0.0",
94
94
  "styled-components": "^5.3.6"
@@ -104,7 +104,7 @@ export default function InternationalizedArray(
104
104
  // Create default fields if the document is not yet created
105
105
  const documentCreatedAt = useFormValue(['_createdAt'])
106
106
  const [hasAddedDefaultLanguages, setHasAddedDefaultLanguages] =
107
- useState(false)
107
+ useState(Boolean(documentCreatedAt))
108
108
 
109
109
  // Write default languages
110
110
  useEffect(() => {