From c3f12592da89fc6c232fa592b7012493ee90e4d3 Mon Sep 17 00:00:00 2001 From: Adam Scott Date: Sun, 1 Jan 2023 14:09:17 -0500 Subject: [PATCH] Cache script when reloading even if there's errors. --- modules/gdscript/gdscript_cache.cpp | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/modules/gdscript/gdscript_cache.cpp b/modules/gdscript/gdscript_cache.cpp index 6faf2dde73c..ca0f77bc0ae 100644 --- a/modules/gdscript/gdscript_cache.cpp +++ b/modules/gdscript/gdscript_cache.cpp @@ -298,13 +298,7 @@ Ref GDScriptCache::get_full_script(const String &p_path, Error &r_erro singleton->full_gdscript_cache[p_path] = script; singleton->shallow_gdscript_cache.erase(p_path); - r_error = script->reload(true); - if (r_error) { - singleton->shallow_gdscript_cache[p_path] = script; - singleton->full_gdscript_cache.erase(p_path); - return script; - } - + script->reload(true); return script; }