mirror of
https://github.com/slhaf/Partner.git
synced 2026-05-12 08:43:02 +08:00
fix(framework): reject additional components missing @AgentComponent annotation
This commit is contained in:
@@ -42,7 +42,7 @@ object AgentContext {
|
||||
|
||||
fun addAdditionalComponent(instance: Any): Boolean {
|
||||
val type = instance::class.java
|
||||
if (type.isAnnotationPresent(AgentComponent::class.java)) {
|
||||
if (!type.isAnnotationPresent(AgentComponent::class.java)) {
|
||||
return false
|
||||
}
|
||||
_additionalComponents[type] = instance
|
||||
|
||||
Reference in New Issue
Block a user