소스 검색

Update layout-nav.component.ts

MaxKey 2 년 전
부모
커밋
b5e4858608
1개의 변경된 파일2개의 추가작업 그리고 2개의 파일을 삭제
  1. 2 2
      maxkey-web-frontend/maxkey-web-mgt-app/src/app/theme/layout-default/layout-nav.component.ts

+ 2 - 2
maxkey-web-frontend/maxkey-web-mgt-app/src/app/theme/layout-default/layout-nav.component.ts

@@ -110,9 +110,9 @@ export class LayoutDefaultNavComponent implements OnInit, OnDestroy {
     if (linkNode == null) {
       return false;
     }
-    const id = +(linkNode.dataset !== undefined) ? linkNode.dataset?.['id'] : '';
+    const id = +linkNode.dataset!['id']!;
     // Should be ingore children title trigger event
-    if (id == '') {
+    if (isNaN(id)) {
       return false;
     }