Skip to content

Commit 0ede725

Browse files
pishensjrd
authored andcommitted
Fix the return type of URLSearchParams.get (#372)
According to the documentation https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams/get#Return_value URLSearchParams.get will return null but not undefined when the parameter is not found.
1 parent 22f38bc commit 0ede725

File tree

1 file changed

+1
-1
lines changed
  • src/main/scala/org/scalajs/dom/experimental

1 file changed

+1
-1
lines changed

src/main/scala/org/scalajs/dom/experimental/URL.scala

+1-1
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ class URLSearchParams
119119

120120
def delete(name: String): Unit = js.native
121121

122-
def get(name: String): js.UndefOr[String] = js.native
122+
def get(name: String): String = js.native
123123

124124
def getAll(name: String): Sequence[String] = js.native
125125

0 commit comments

Comments
 (0)