@codeleap/web 3.22.2 → 3.23.0

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": "@codeleap/web",
3
- "version": "3.22.2",
3
+ "version": "3.23.0",
4
4
  "main": "src/index.ts",
5
5
  "repository": {
6
6
  "url": "https://github.com/codeleap-uk/internal-libs-monorepo.git",
@@ -177,7 +177,7 @@ const DropzoneComponent = (props: DropzoneProps, ref: React.ForwardedRef<Dropzon
177
177
  open,
178
178
  }))
179
179
 
180
- const hasFiles = acceptedFiles.length > 0 || rejectedFiles.length > 0
180
+ const hasFiles = acceptedFiles?.length > 0 || rejectedFiles?.length > 0
181
181
 
182
182
  const fileProps = {
183
183
  fileLeftIcon,
@@ -199,7 +199,7 @@ const DropzoneComponent = (props: DropzoneProps, ref: React.ForwardedRef<Dropzon
199
199
 
200
200
  {hasFiles && (
201
201
  <View css={variantStyles.filesWrapper}>
202
- {acceptedFiles.map((file, index) => (
202
+ {acceptedFiles?.map?.((file, index) => (
203
203
  <FilePreview
204
204
  {...fileProps}
205
205
  index={index}
@@ -209,7 +209,7 @@ const DropzoneComponent = (props: DropzoneProps, ref: React.ForwardedRef<Dropzon
209
209
  FilePreviewComponent={FilePreviewComponent}
210
210
  />))}
211
211
 
212
- {rejectedFiles.map(({ file, errors }, index) => (
212
+ {rejectedFiles?.map?.(({ file, errors }, index) => (
213
213
  <FilePreview
214
214
  {...fileProps}
215
215
  index={index}