From 7195f9806a490cc6fc09d2cb7ee74657a3a53534 Mon Sep 17 00:00:00 2001 From: hadashiA Date: Sun, 28 Apr 2024 23:31:57 +0900 Subject: [PATCH] Fix a bug that ScopedContainerBuilder.Exists to not search two levels above --- VContainer/Assets/VContainer/Runtime/ContainerBuilder.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/VContainer/Assets/VContainer/Runtime/ContainerBuilder.cs b/VContainer/Assets/VContainer/Runtime/ContainerBuilder.cs index bfa87d4d..22969228 100644 --- a/VContainer/Assets/VContainer/Runtime/ContainerBuilder.cs +++ b/VContainer/Assets/VContainer/Runtime/ContainerBuilder.cs @@ -57,7 +57,7 @@ public override bool Exists(Type type, bool includeInterfaceTypes = false, bool var next = parent; while (next != null) { - if (parent.TryGetRegistration(type, out var registration)) + if (next.TryGetRegistration(type, out var registration)) { if (includeInterfaceTypes || registration.ImplementationType == type) {