mirror of
https://github.com/godotengine/godot.git
synced 2025-10-20 08:23:29 +00:00
Merge pull request #109549 from jroprohehe/unknown_error_getting_token_fix
Fix the text editor confusing resource files of class JSON with json files.
This commit is contained in:
commit
9712d6fb1f
1 changed files with 5 additions and 1 deletions
|
@ -4648,7 +4648,11 @@ bool ScriptEditorPlugin::handles(Object *p_object) const {
|
|||
}
|
||||
|
||||
if (Object::cast_to<JSON>(p_object)) {
|
||||
return true;
|
||||
// This is here to stop resource files of class JSON from getting confused
|
||||
// with json files and being opened in the text editor.
|
||||
if (Object::cast_to<JSON>(p_object)->get_path().get_extension().to_lower() == "json") {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return p_object->is_class("Script");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue