Skip to content

Commit

Permalink
fix: use file input
Browse files Browse the repository at this point in the history
  • Loading branch information
robertsLando committed Oct 12, 2023
1 parent 252f878 commit a07fb7d
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions src/views/ControlPanel.vue
Original file line number Diff line number Diff line change
Expand Up @@ -795,7 +795,14 @@ export default {
'alert',
{
confirmText: 'Ok',
width: 500,
inputs: [
{
type: 'file',
label: 'File',
hint: 'NVM file',
key: 'file',
},
{
type: 'checkbox',
label: 'Skip compatibility check',
Expand All @@ -805,12 +812,12 @@ export default {
],
}
)
if (result?.useRaw === undefined) {
if (!result?.file) {
return
}
try {
const { data } = await this.$listeners.import('buffer')
const data = await result.file.arrayBuffer()
args.push(data, result.useRaw)
} catch (error) {
return
Expand Down

0 comments on commit a07fb7d

Please sign in to comment.