@jetthai/cuora 1.1.288 → 1.1.289
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +2 -0
- package/package.json +1 -1
- package/src/machine/side_v2.js +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
|
|
4
4
|
|
|
5
|
+
### [1.1.289](https://github.com/jetthai/cuora-module/compare/v1.1.288...v1.1.289) (2024-07-23)
|
|
6
|
+
|
|
5
7
|
### [1.1.288](https://github.com/jetthai/cuora-module/compare/v1.1.287...v1.1.288) (2024-07-15)
|
|
6
8
|
|
|
7
9
|
### [1.1.287](https://github.com/jetthai/cuora-module/compare/v1.1.286...v1.1.287) (2024-07-09)
|
package/package.json
CHANGED
package/src/machine/side_v2.js
CHANGED
|
@@ -87,7 +87,7 @@ export default function (request) {
|
|
|
87
87
|
const { menuItemStack } = context
|
|
88
88
|
const inputItem = event.data
|
|
89
89
|
const isTopItem = inputItem.level === 0
|
|
90
|
-
const hasSubMenu = inputItem.sub
|
|
90
|
+
const hasSubMenu = inputItem.sub?.length
|
|
91
91
|
|
|
92
92
|
if (isTopItem) {
|
|
93
93
|
if (hasSubMenu) {
|
|
@@ -177,7 +177,7 @@ function isItemInMenu(targetItem, menuList) {
|
|
|
177
177
|
}
|
|
178
178
|
|
|
179
179
|
function getDefaultItem(node) {
|
|
180
|
-
if (node.sub
|
|
180
|
+
if (node.sub?.length > 0) {
|
|
181
181
|
const stack = getDefaultItem(node.sub[0])
|
|
182
182
|
return [node, ...stack]
|
|
183
183
|
} else {
|