@snabcentr/client-ui 0.3.2 → 0.3.3
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.
Potentially problematic release.
This version of @snabcentr/client-ui might be problematic. Click here for more details.
@@ -339,6 +339,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImpor
|
|
339
339
|
*/
|
340
340
|
function stepValidator(step, precision = 3) {
|
341
341
|
return ({ value }) => {
|
342
|
+
if (!step) {
|
343
|
+
return null;
|
344
|
+
}
|
342
345
|
if (value) {
|
343
346
|
return Number((value / step).toFixed(precision)) % 1 !== 0 ? { error: `Число не кратно ${step}` } : null;
|
344
347
|
}
|