File tree Expand file tree Collapse file tree 1 file changed +5
-7
lines changed
app/src/main/java/com/example/nav3recipes/deeplink/basic/util Expand file tree Collapse file tree 1 file changed +5
-7
lines changed Original file line number Diff line number Diff line change @@ -86,13 +86,11 @@ internal class DeepLinkPattern<T : NavKey>(
8686 val queryValueParsers: Map <String , TypeParser > = buildMap {
8787 uriPattern.queryParameterNames.forEach { paramName ->
8888 val elementIndex = serializer.descriptor.getElementIndex(paramName)
89- if (elementIndex == CompositeDecoder . UNKNOWN_NAME ) {
90- throw IllegalArgumentException (
91- " Query parameter ' $paramName ' defined in the DeepLink $uriPattern does not exist in the Serializable class ' ${ serializer.descriptor.serialName} '. "
92- )
89+ // Ignore static query parameters that are not in the Serializable class
90+ if (elementIndex != CompositeDecoder . UNKNOWN_NAME ) {
91+ val elementDescriptor = serializer.descriptor.getElementDescriptor(elementIndex)
92+ this [paramName] = getTypeParser(elementDescriptor.kind )
9393 }
94- val elementDescriptor = serializer.descriptor.getElementDescriptor(elementIndex)
95- this [paramName] = getTypeParser(elementDescriptor.kind)
9694 }
9795 }
9896
@@ -126,4 +124,4 @@ private fun getTypeParser(kind: SerialKind): TypeParser {
126124 " Unsupported argument type of SerialKind:$kind . The argument type must be a Primitive."
127125 )
128126 }
129- }
127+ }
You can’t perform that action at this time.
0 commit comments