Hot fix for observable meta wrapper
This commit is contained in:
parent
78641f6f87
commit
0e5a31db9f
@ -15,9 +15,9 @@ private class ObservableMetaWrapper(
|
|||||||
val listeners: MutableSet<MetaListener>,
|
val listeners: MutableSet<MetaListener>,
|
||||||
) : ObservableMutableMeta {
|
) : ObservableMutableMeta {
|
||||||
override val items: Map<NameToken, ObservableMutableMeta>
|
override val items: Map<NameToken, ObservableMutableMeta>
|
||||||
get() = root.items.keys.associateWith {
|
get() = root[nodeName]?.items?.keys?.associateWith {
|
||||||
ObservableMetaWrapper(root, nodeName + it, listeners)
|
ObservableMetaWrapper(root, nodeName + it, listeners)
|
||||||
}
|
} ?: emptyMap()
|
||||||
|
|
||||||
override fun get(name: Name): ObservableMutableMeta? = if (root[nodeName + name] == null) {
|
override fun get(name: Name): ObservableMutableMeta? = if (root[nodeName + name] == null) {
|
||||||
null
|
null
|
||||||
|
@ -17,6 +17,8 @@ class ObservableMetaTest {
|
|||||||
}
|
}
|
||||||
}.asObservable()
|
}.asObservable()
|
||||||
|
|
||||||
|
println(meta)
|
||||||
|
|
||||||
assertEquals("scatter", meta["data.type"].string)
|
assertEquals("scatter", meta["data.type"].string)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user