fix: Improve get caller file path util (#7974)

* fix: Improve get caller file path util

* improve compatibility

* update comment

---------

Co-authored-by: Riqwan Thamir <rmthamir@gmail.com>
This commit is contained in:
Adrien de Peretti
2024-07-05 12:54:27 +02:00
committed by GitHub
co-authored by Riqwan Thamir
parent de0a9c14ab
commit 1393f51046
2 changed files with 18 additions and 17 deletions
@@ -69,7 +69,6 @@ export function defineJoinerConfig(
loadedModels = []
let index = 1
const maxSearchIndex = 6
while (true) {
++index
@@ -101,7 +100,7 @@ export function defineJoinerConfig(
loadedModels = loadModels(basePath)
if (index === maxSearchIndex || loadedModels.length) {
if (loadedModels.length) {
break
}
}