]> git.ipfire.org Git - thirdparty/vuejs/router.git/commitdiff
chore: remove todos
authorEduardo San Martin Morote <posva13@gmail.com>
Tue, 7 May 2019 08:40:29 +0000 (10:40 +0200)
committerEduardo San Martin Morote <posva13@gmail.com>
Tue, 7 May 2019 08:40:29 +0000 (10:40 +0200)
src/history/html5.ts
src/matcher.ts

index 11fcfd0fd317caacf582673af0e689ae79ccb070..adb3da4cb97cdef0dc1aa375627cbafe15774d28 100644 (file)
@@ -4,6 +4,8 @@ import { NavigationCallback, HistoryState, NavigationType } from './base'
 
 const cs = consola.withTag('html5')
 
+// TODO: implement the mock instead
+/* istanbul ignore next */
 // @ts-ignore
 if (process.env.NODE_ENV === 'test') cs.mockTypes(() => jest.fn())
 
index 8982b07b0bd475612e3b315df639e1059c9c20c8..f5fa85a78634f5b765f560dca7f88c5c982e862f 100644 (file)
@@ -55,8 +55,7 @@ export class RouterMatcher {
       resolve: pathToRegexp.compile(recordCopy.path),
     }
 
-    // TODO: why is the isArray check necessary for ts?
-    if ('children' in record && Array.isArray(record.children)) {
+    if ('children' in record && record.children) {
       for (const childRecord of record.children) {
         this.addRouteRecord(childRecord, matcher)
       }