@8base/utils
Advanced tools
Comparing version 0.3.7 to 0.3.8
@@ -12,3 +12,5 @@ import { MUTATION_TYPE } from '../constants'; | ||
} else { | ||
formatedData = { id: formatedData }; | ||
formatedData = { | ||
id: typeof formatedData === 'string' ? formatedData : formatedData.id || formatedData | ||
}; | ||
} | ||
@@ -15,0 +17,0 @@ |
@@ -7,5 +7,5 @@ import * as R from 'ramda'; | ||
var isFileReference = function isFileReference(fieldSchema, data) { | ||
return isFileField(fieldSchema) && !R.isNil(data) && (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' || data && typeof data.id === 'string'); | ||
}; | ||
export { isFileReference }; |
{ | ||
"name": "@8base/utils", | ||
"version": "0.3.7", | ||
"version": "0.3.8", | ||
"main": "es/index.js", | ||
@@ -35,3 +35,3 @@ "module": "es/index.js", | ||
}, | ||
"gitHead": "e2790dcf125e2b2e709e8d51debe13f65b430469" | ||
"gitHead": "7bda0c066c1b41ee34128f5a50f06e94e678dc8a" | ||
} |
@@ -11,3 +11,5 @@ //@flow | ||
} else { | ||
formatedData = { id: formatedData }; | ||
formatedData = { | ||
id: typeof formatedData === 'string' ? formatedData : (formatedData.id || formatedData), | ||
}; | ||
} | ||
@@ -14,0 +16,0 @@ |
@@ -12,5 +12,11 @@ //@flow | ||
&& | ||
(typeof data === 'string' || data.length === 0 || typeof data[0] === 'string') | ||
( | ||
typeof data === 'string' | ||
|| | ||
(data.length === 0 || typeof data[0] === 'string') | ||
|| | ||
(data && typeof data.id === 'string') | ||
) | ||
); | ||
export { isFileReference }; |
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
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
2373824
16332
0