Commit 53ebe2b
committed
fix(example): wait for FileReader and sort marker files by extension in demo.html
loadFset was called synchronously with an empty dataURLs array; FileReader
onload callbacks pushed results only after loadFset had already returned.
Files were also assumed to arrive in [iset, fset3, fset] order, which is
not guaranteed by the OS file picker.
Use Promise.all to await all three reads, then sort files by extension
before passing to loadFset.1 parent 419cdb0 commit 53ebe2b
1 file changed
Lines changed: 16 additions & 11 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
60 | 60 | | |
61 | 61 | | |
62 | 62 | | |
63 | | - | |
64 | | - | |
65 | | - | |
66 | | - | |
67 | | - | |
68 | | - | |
69 | | - | |
70 | | - | |
71 | | - | |
72 | | - | |
73 | | - | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
74 | 79 | | |
75 | 80 | | |
76 | 81 | | |
| |||
0 commit comments