We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0194c38 commit 15c63a3Copy full SHA for 15c63a3
1 file changed
src/pages/index.js
@@ -410,10 +410,12 @@ const IndexPage = () => {
410
411
const handleFileInput = e => {
412
const file = e.target.files[0]
413
- const reader = new FileReader()
414
- reader.readAsText(file, "UTF-8")
415
- reader.onload = () => {
416
- setRestore(reader.result)
+ if (file && file.type === "application/json") {
+ const reader = new FileReader()
+ reader.readAsText(file, "UTF-8")
+ reader.onload = () => {
417
+ setRestore(reader.result)
418
+ }
419
}
420
421
0 commit comments