summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--editor/plugins/script_editor_plugin.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/editor/plugins/script_editor_plugin.cpp b/editor/plugins/script_editor_plugin.cpp
index 92579e5cef..828abef9a9 100644
--- a/editor/plugins/script_editor_plugin.cpp
+++ b/editor/plugins/script_editor_plugin.cpp
@@ -3305,9 +3305,7 @@ void ScriptEditorPlugin::edit(Object *p_object) {
} else {
script_editor->edit(p_script);
}
- }
-
- if (Object::cast_to<TextFile>(p_object)) {
+ } else if (Object::cast_to<TextFile>(p_object)) {
script_editor->edit(Object::cast_to<TextFile>(p_object));
}
}