浏览代码

EditorHelp: Fix displaying typed `Array` links

Danil Alexeev 2 年之前
父节点
当前提交
a16b2fc3b6
共有 1 个文件被更改,包括 2 次插入1 次删除
  1. 2 1
      editor/editor_help.cpp

+ 2 - 1
editor/editor_help.cpp

@@ -320,7 +320,8 @@ void EditorHelp::_add_type(const String &p_type, const String &p_enum) {
 	if (can_ref) {
 		if (link_t.ends_with("[]")) {
 			add_array = true;
-			link_t = link_t.replace("[]", "");
+			link_t = link_t.trim_suffix("[]");
+			display_t = display_t.trim_suffix("[]");
 
 			class_desc->push_meta("#Array"); // class
 			class_desc->add_text("Array");