From: Eduardo San Martin Morote Date: Tue, 7 May 2019 08:40:29 +0000 (+0200) Subject: chore: remove todos X-Git-Tag: v4.0.0-alpha.0~370 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2341f81397af3238fff181edd5db279c937a12e0;p=thirdparty%2Fvuejs%2Frouter.git chore: remove todos --- diff --git a/src/history/html5.ts b/src/history/html5.ts index 11fcfd0f..adb3da4c 100644 --- a/src/history/html5.ts +++ b/src/history/html5.ts @@ -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()) diff --git a/src/matcher.ts b/src/matcher.ts index 8982b07b..f5fa85a7 100644 --- a/src/matcher.ts +++ b/src/matcher.ts @@ -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) }