Skip to content

Commit d513313

Browse files
author
nicosammito
committed
feat: remove redundant type check for number in DFlowDataTypeRangeRule validation
1 parent 3a1946b commit d513313

1 file changed

Lines changed: 0 additions & 1 deletion

File tree

src/components/d-flow-data-type/rules/DFlowDataTypeNumberRangeRule.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ import type {DataTypeRulesNumberRangeConfig, NodeParameterValue} from "@code0-te
55
export class DFlowDataTypeRangeRule {
66
public static validate(value: NodeParameterValue, config: DataTypeRulesNumberRangeConfig): boolean {
77
if (value.__typename !== 'LiteralValue') return false
8-
if (!(typeof value.value === "number")) return false
98
if (!config.from || !config.to) return false
109
return value.value >= config.from && value.value <= config.to
1110
}

0 commit comments

Comments
 (0)