This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ngOnInit() { | |
this.filteredRoutes$ = from(this.routes).pipe( | |
concatMap((route) => { | |
// handle if nothing is in canActivate | |
if (!route.canActivate || !route.canActivate.length) { | |
// create an object that has the route and result for filtering | |
return of({ route, result: true }); | |
} | |
return from(route.canActivate).pipe( |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* External dependencies | |
*/ | |
const { isUndefined, pickBy } = lodash; | |
/** | |
* WordPress dependencies | |
*/ | |
const { | |
registerBlockType, |