@8base/utils
Advanced tools
Comparing version 0.2.9 to 0.2.10
@@ -0,1 +1,3 @@ | ||
import * as R from 'ramda'; | ||
import { isFileField } from './isFileField'; | ||
@@ -5,5 +7,5 @@ | ||
var isFileReference = function isFileReference(fieldSchema, data) { | ||
return isFileField(fieldSchema) && (typeof data === 'string' || data.length === 0 || typeof data[0] === 'string'); | ||
return isFileField(fieldSchema) && !R.isNil(data) && (typeof data === 'string' || data.length === 0 || typeof data[0] === 'string'); | ||
}; | ||
export { isFileReference }; |
{ | ||
"name": "@8base/utils", | ||
"version": "0.2.9", | ||
"version": "0.2.10", | ||
"main": "es/index.js", | ||
@@ -5,0 +5,0 @@ "module": "es/index.js", |
//@flow | ||
import * as R from 'ramda'; | ||
import { isFileField } from './isFileField'; | ||
@@ -8,2 +10,4 @@ import type { FieldSchema } from '../types'; | ||
&& | ||
!R.isNil(data) | ||
&& | ||
(typeof data === 'string' || data.length === 0 || typeof data[0] === 'string') | ||
@@ -10,0 +14,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
223402
508