File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
tests-shared/src/main/scala/org/scalajs/dom/tests/shared Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -12,6 +12,7 @@ import org.scalajs.dom.tests.shared.AsyncTesting.async
12
12
import scala .concurrent .Future
13
13
import scala .scalajs .js
14
14
import scala .scalajs .js .Thenable .Implicits ._
15
+ import scala .scalajs .js .|
15
16
16
17
trait BrowserTests {
17
18
@@ -26,11 +27,11 @@ trait BrowserTests {
26
27
27
28
val stream = ReadableStream [Tuna ](
28
29
new ReadableStreamUnderlyingSource [Tuna ] {
29
- start = { (controller : ReadableStreamController [Tuna ]) =>
30
+ start = js.defined( { (controller : ReadableStreamController [Tuna ]) =>
30
31
controller.enqueue(Tuna (" blue" ))
31
32
controller.enqueue(Tuna (" red" ))
32
33
controller.close()
33
- }: js.Function1 [ReadableStreamController [Tuna ], Unit ]
34
+ }) : js.UndefOr [js. Function1 [ReadableStreamController [Tuna ], Unit | js. Promise [ Unit ]] ]
34
35
}
35
36
)
36
37
You can’t perform that action at this time.
0 commit comments