From 788d2aa3f4f0c1c94a46ac0622602e0a9f6b117d Mon Sep 17 00:00:00 2001 From: Simon Asika Date: Thu, 11 Jul 2024 13:11:13 +0800 Subject: [PATCH] array --- src/Core/Edge/ComponentFinder.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/Core/Edge/ComponentFinder.php b/src/Core/Edge/ComponentFinder.php index ca544889..f4df0fbc 100644 --- a/src/Core/Edge/ComponentFinder.php +++ b/src/Core/Edge/ComponentFinder.php @@ -43,7 +43,11 @@ public function find(): array fn () => $this->scan() ); - if (!is_array($caches) || array_is_list($caches)) { + if ($caches === []) { + return $caches; + } + + if ((!is_array($caches) || array_is_list($caches))) { throw new \RuntimeException('The class component list should be assoc array.'); }