Fix filter failing on undefined endpoints

This commit is contained in:
Sam Carlton 2021-05-08 15:48:54 -05:00
parent 6b17690f21
commit 0cbe9b33d5
3 changed files with 9 additions and 0 deletions

View file

@ -56,6 +56,9 @@ export class AppTemplate {
before: function( data ) {
return data.filter( entry => {
// Skip endpoints with no payload
if ( entry === undefined || !entry.hasOwnProperty('payload') ) return false
const appType = getAppType( entry.payload.app )
return appType === 'app'