File tree Expand file tree Collapse file tree 2 files changed +9
-1
lines changed Expand file tree Collapse file tree 2 files changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -239,6 +239,10 @@ export default class PocketProvider {
239239 } ;
240240 const stories = await this . getStories ( combinedSearchParams ) ;
241241 for ( const story of stories ) {
242+ if ( story . url === undefined || story . title === undefined ) {
243+ console . warn ( "WARN: Skipping story due to undefined url or title:" , story ) ;
244+ continue ; // Skip this iteration
245+ }
242246 feed . addArticleAcquisitionEntry ( story . url , story . title ) ;
243247 }
244248 res . type ( 'application/xml' ) . send ( feed . toXmlString ( ) ) ;
@@ -267,6 +271,10 @@ export default class PocketProvider {
267271 } ;
268272 const stories = await this . getStories ( combinedSearchParams ) ;
269273 for ( const story of stories ) {
274+ if ( story . url === undefined || story . title === undefined ) {
275+ console . warn ( "WARN: Skipping story due to undefined url or title:" , story ) ;
276+ continue ; // Skip this iteration
277+ }
270278 feed . addArticleAcquisitionEntry ( story . url , story . title ) ;
271279 }
272280 res . type ( 'application/xml' ) . send ( feed . toXmlString ( ) ) ;
@@ -322,4 +330,4 @@ export default class PocketProvider {
322330 // Persist the access token into the config dir
323331 fs . writeFileSync ( this . authConfigPath , token ) ;
324332 }
325- }
333+ }
You can’t perform that action at this time.
0 commit comments