Commit 2592245
committed
Fix bug preventing the same file from being imported twice
Bug: suppose we have a file which causes the profiler to display an error when
imported. Importing the file once causes the error to be displayed correctly.
However, if the file is imported a second time, the error is not displayed
again.
This happens because we listen to the `input` element's `onChange` event.
Selecting the same file a second time does not cause the element's value to
change, so the `handleFiles` callback is not called.
This commit fixes this bug by emptying the `input` element's `value` in
`handleFiles`.
This bug is also present in the React DevTools Profiler.1 parent 583522b commit 2592245
1 file changed
Lines changed: 8 additions & 1 deletion
Lines changed: 8 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
35 | | - | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
36 | 40 | | |
37 | 41 | | |
38 | 42 | | |
| |||
54 | 58 | | |
55 | 59 | | |
56 | 60 | | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
57 | 64 | | |
58 | 65 | | |
59 | 66 | | |
| |||
0 commit comments