Yuki Takei 2 лет назад
Родитель
Сommit
5c434a252b
1 измененных файлов с 10 добавлено и 3 удалено
  1. 10 3
      packages/core/src/models/devided-page-path.ts

+ 10 - 3
packages/core/src/models/devided-page-path.ts

@@ -5,12 +5,19 @@ const PATTERN_INCLUDE_DATE = /^(.+\/[^/]+)\/(\d{4}|\d{4}\/\d{2}|\d{4}\/\d{2}\/\d
 
 
 export class DevidedPagePath {
 export class DevidedPagePath {
 
 
-  constructor(path, skipNormalize = false, evalDatePath = false) {
+  isRoot: boolean;
+
+  isFormerRoot: boolean;
+
+  former: string;
+
+  latter: string;
+
+  constructor(path: string, skipNormalize = false, evalDatePath = false) {
 
 
     this.isRoot = false;
     this.isRoot = false;
     this.isFormerRoot = false;
     this.isFormerRoot = false;
-    this.former = null;
-    this.latter = null;
+    this.former = '';
 
 
     // root
     // root
     if (path == null || path === '' || path === '/') {
     if (path == null || path === '' || path === '/') {