Do not search for global functions if scripted.

This commit is contained in:
Stephen Chung
2022-09-21 18:30:12 +08:00
parent 5d275b5307
commit 6eef11123a
5 changed files with 28 additions and 28 deletions

View File

@@ -240,7 +240,7 @@ impl Engine {
}
// First check script-defined functions
let result = lib.iter().any(|&m| m.contains_fn(hash_script))
let result = lib.iter().any(|m| m.contains_fn(hash_script))
// Then check the global namespace and packages
|| self.global_modules.iter().any(|m| m.contains_fn(hash_script));