Skip to content

Commit

Permalink
GDScript: More reliable check if loading a template.
Browse files Browse the repository at this point in the history
Prevents showing some useless parse errors in the console.
  • Loading branch information
27thLiz committed Aug 24, 2017
1 parent a518ed1 commit f61e869
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion modules/gdscript/gd_script.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -616,7 +616,7 @@ Error GDScript::reload(bool p_keep_state) {
if (basedir != "")
basedir = basedir.get_base_dir();

if (basedir != "" && basedir.find("res://") == -1 && basedir.find("user://") == -1) {
if (source.find("%BASE%") != -1) {
//loading a template, don't parse
return OK;
}
Expand Down

0 comments on commit f61e869

Please sign in to comment.