From f881f3b1c676d0ebfaedf5e735bc8ef508c0463f Mon Sep 17 00:00:00 2001 From: btzr-io Date: Wed, 12 Aug 2020 13:21:05 -0500 Subject: [PATCH] fix WebFile flow type --- flow-typed/web-file.js | 9 ++++----- ui/component/publishFile/view.jsx | 1 + 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/flow-typed/web-file.js b/flow-typed/web-file.js index 08f995d43..d1445a90f 100644 --- a/flow-typed/web-file.js +++ b/flow-typed/web-file.js @@ -1,7 +1,6 @@ -declare type WebFile = { - name: string, +// @flow + +declare type WebFile = File & { + path?: string, title?: string, - path: string, - size: string, - type: string, } diff --git a/ui/component/publishFile/view.jsx b/ui/component/publishFile/view.jsx index cf5d1542b..7870e1368 100644 --- a/ui/component/publishFile/view.jsx +++ b/ui/component/publishFile/view.jsx @@ -241,6 +241,7 @@ function PublishFile(props: Props) { } } + // Flow error [+] function handleFileChange(file: WebFile) { const { showToast } = props; window.URL = window.URL || window.webkitURL;