Skip to content

Commit d90febf

Browse files
authored
Update core.ts
1 parent 12e2d1e commit d90febf

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/core.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,7 @@ export function keydownHandler(event: KeyboardEvent, el: CustomInputElement) {
212212
const { options } = el
213213
const regExp = new RegExp(`${options.prefix}|${options.suffix}`, 'g')
214214
const newValue = el.value.replace(regExp, '')
215-
const canNegativeInput = options.min < 0 || !options.min
215+
const canNegativeInput = options.min < 0
216216
if (([110, 190].includes(event.keyCode) || event.key === options.decimal) && newValue.includes(options.decimal)) {
217217
event.preventDefault()
218218
} else if ([109].includes(event.keyCode) && !canNegativeInput) {

0 commit comments

Comments
 (0)