diff --git a/package.json b/package.json index 8b97abef..fa4b5206 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "skyflow-js", "preferGlobal": true, "analyze": false, - "version": "1.38.1", + "version": "1.38.1-dev.00a909d", "author": "Skyflow", "description": "Skyflow JavaScript SDK", "homepage": "https://github.com/skyflowapi/skyflow-js", diff --git a/src/libs/element-options.ts b/src/libs/element-options.ts index 2dbff89d..c50c60fb 100644 --- a/src/libs/element-options.ts +++ b/src/libs/element-options.ts @@ -218,9 +218,10 @@ export const getValueAndItsUnit = ( return [string.slice(0, index), string.slice(index)]; }; -export const formatValidations = (validations?: IValidationRule[]): IValidationRule[] => { +export const formatValidations = (validations?: IValidationRule[]): +IValidationRule[] | undefined => { if (!validations || !Array.isArray(validations) || validations.length === 0) { - return []; + return validations; } return validations.map((validationRule: IValidationRule, index: number) => {