@8base/utils
Advanced tools
Comparing version 0.3.0 to 0.3.1
@@ -5,5 +5,5 @@ import { isFileField } from './isFileField'; | ||
var isFileInstance = function isFileInstance(fieldSchema, data) { | ||
return isFileField(fieldSchema) && data && typeof data.fileId === 'string'; | ||
return isFileField(fieldSchema) && (data && typeof data.fileId === 'string' || Array.isArray(data) && isFileInstance(fieldSchema, data[0])); | ||
}; | ||
export { isFileInstance }; |
{ | ||
"name": "@8base/utils", | ||
"version": "0.3.0", | ||
"version": "0.3.1", | ||
"main": "es/index.js", | ||
@@ -5,0 +5,0 @@ "module": "es/index.js", |
@@ -9,2 +9,4 @@ //@flow | ||
(data && typeof data.fileId === 'string') | ||
|| | ||
(Array.isArray(data) && isFileInstance(fieldSchema, data[0])) | ||
) | ||
@@ -11,0 +13,0 @@ ); |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
282523
515