fix: wrong value for iterator in PatchOptions

This commit is contained in:
Sculas 2022-09-08 17:37:31 +02:00
parent 8f78f85e4a
commit e31ac1f132
No known key found for this signature in database
GPG key ID: 1530BFF96D1EEB89

View file

@ -17,7 +17,7 @@ object RequirementNotMetException : Exception("null was passed into an option th
* A registry for an array of [PatchOption]s.
* @param options An array of [PatchOption]s.
*/
class PatchOptions(vararg val options: PatchOption<*>) : Iterable<PatchOption<*>> {
class PatchOptions(vararg options: PatchOption<*>) : Iterable<PatchOption<*>> {
private val register = mutableMapOf<String, PatchOption<*>>()
init {
@ -60,7 +60,7 @@ class PatchOptions(vararg val options: PatchOption<*>) : Iterable<PatchOption<*>
get(key).value = null
}
override fun iterator() = options.iterator()
override fun iterator() = register.values.iterator()
}
/**