fix(mp): 微信公众号支持配置单个主菜单

This commit is contained in:
冷冷 committed 2025-03-09 21:39:21 +08:00
1 parent 4a97acd67d
commit 1665598520
1 file changed
+1 -2
@@ -22,7 +22,6 @@ import org.springframework.stereotype.Component;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.Objects;
/**
* @author Binary Wang(https://github.com/binarywang)
@@ -58,7 +57,7 @@ public class MenuHandler extends AbstractHandler {
List<JSONObject> buttonList = new ArrayList<>();
for (JSONObject button : buttons) {
JSONArray subButton = button.getJSONArray("sub_button");
if (Objects.isNull(subButton)) {
if (subButton.isEmpty()) {
buttonList.add(button);
continue;
}