mirror of
https://github.com/InsanusMokrassar/MicroUtils.git
synced 2024-11-22 16:23:50 +00:00
hotfix in selectFile
This commit is contained in:
parent
76813fae8e
commit
02520636ad
@ -14,7 +14,6 @@ fun selectFile(
|
|||||||
(document.createElement("input") {
|
(document.createElement("input") {
|
||||||
(this as HTMLInputElement).apply {
|
(this as HTMLInputElement).apply {
|
||||||
type = "file"
|
type = "file"
|
||||||
inputSetup(this)
|
|
||||||
onchange = {
|
onchange = {
|
||||||
runCatching {
|
runCatching {
|
||||||
files ?.get(0) ?: error("File must not be null")
|
files ?.get(0) ?: error("File must not be null")
|
||||||
@ -24,6 +23,7 @@ fun selectFile(
|
|||||||
onFailure(it)
|
onFailure(it)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
inputSetup(this)
|
||||||
}
|
}
|
||||||
} as HTMLElement).click()
|
} as HTMLElement).click()
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user