diff --git a/projects/scullyio/ng-lib/package.json b/projects/scullyio/ng-lib/package.json index bbbc457a2..c2483cc1b 100644 --- a/projects/scullyio/ng-lib/package.json +++ b/projects/scullyio/ng-lib/package.json @@ -1,6 +1,6 @@ { "name": "@scullyio/ng-lib", - "version": "0.0.12", + "version": "0.0.13", "repository": { "type": "GIT", "url": "https://github.com/scullyio/scully/tree/master/projects/scullyio/ng-lib" diff --git a/projects/scullyio/ng-lib/src/lib/route-service/scully-routes.service.ts b/projects/scullyio/ng-lib/src/lib/route-service/scully-routes.service.ts index a8e99dc0b..efe8d3e34 100644 --- a/projects/scullyio/ng-lib/src/lib/route-service/scully-routes.service.ts +++ b/projects/scullyio/ng-lib/src/lib/route-service/scully-routes.service.ts @@ -1,6 +1,6 @@ import {Injectable} from '@angular/core'; import {Observable, of, ReplaySubject} from 'rxjs'; -import {catchError, map, shareReplay, switchMap} from 'rxjs/operators'; +import {catchError, map, shareReplay, switchMap, filter} from 'rxjs/operators'; import {fetchHttp} from '../utils/fetchHttp'; export interface ScullyRoute { @@ -25,6 +25,8 @@ export class ScullyRoutesService { ); return of([] as ScullyRoute[]); }), + /** filter out all non-array results */ + filter(routes => Array.isArray(routes)), shareReplay({refCount: false, bufferSize: 1}) ); available$ = this.allRoutes$.pipe( diff --git a/scully/package.json b/scully/package.json index 4ed9453d8..6a03100df 100644 --- a/scully/package.json +++ b/scully/package.json @@ -1,6 +1,6 @@ { "name": "@scullyio/scully", - "version": "0.0.58", + "version": "0.0.60", "description": "Scully CLI", "repository": { "type": "GIT", diff --git a/scully/utils/defaultAction.ts b/scully/utils/defaultAction.ts index 12edd3870..4d39e5896 100644 --- a/scully/utils/defaultAction.ts +++ b/scully/utils/defaultAction.ts @@ -19,7 +19,6 @@ export const generateAll = async (config?: Partial) => { try { log('Finding all routes in application.'); const unhandledRoutes = await traverseAppRoutes(); - console.log('hr', unhandledRoutes); if (unhandledRoutes.length < 1) { logWarn('No routes found in application, are you sure you installed the router? Terminating.');