Skip to content

Commit 611edcd

Browse files
committed
fix(play): a file that did not come is said also before any of it came, and with the question shown (#106)
1 parent 007ef41 commit 611edcd

1 file changed

Lines changed: 6 additions & 3 deletions

File tree

‎src/h5p/play/play-page.ts‎

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -472,12 +472,15 @@ function notBrought(why = ''): void {
472472
/**
473473
* The parent says a file it was asked for did not come (#106). For a download, that is said
474474
* under the stage. For a file the activity is waiting to be built with, the person is asked for
475-
* it, with the reason. At any other time it says nothing new.
475+
* it, with the reason: while it is shown coming, while the question is held back a moment for
476+
* the parent's answer, and where the question is shown already. At any other time it says
477+
* nothing new.
476478
*/
477479
function failed(): void {
478480
if (bringing && previewed.length) return notBrought()
479-
if (main.dataset.state !== 'fetching' || whole || packing) return
480-
const { missing } = filesFor(wanted)
481+
const waiting = main.dataset.state === 'fetching' || main.dataset.state === 'asking' || askTimer !== undefined
482+
if (!waiting || whole || packing) return
483+
const { missing } = linksFor(filesFor(wanted).missing)
481484
if (!missing.length) return
482485
ask(missing)
483486
const one = missing.length === 1

0 commit comments

Comments
 (0)