Browse Source

Cache script when reloading even if there's errors.

Adam Scott 2 years ago
parent
commit
c3f12592da
1 changed files with 1 additions and 7 deletions
  1. 1 7
      modules/gdscript/gdscript_cache.cpp

+ 1 - 7
modules/gdscript/gdscript_cache.cpp

@@ -298,13 +298,7 @@ Ref<GDScript> GDScriptCache::get_full_script(const String &p_path, Error &r_erro
 	singleton->full_gdscript_cache[p_path] = script;
 	singleton->full_gdscript_cache[p_path] = script;
 	singleton->shallow_gdscript_cache.erase(p_path);
 	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;
 	return script;
 }
 }