fix: 内购类型为订阅时没有封面 url 导致报错的问题 (#3574)
This commit is contained in:
@@ -41,13 +41,15 @@ module.exports = async (ctx) => {
|
||||
|
||||
item = iap.map((e) => {
|
||||
const title = `${e.attributes.name} is now ${e.attributes.offers[0].priceFormatted}`;
|
||||
return {
|
||||
|
||||
const result = {
|
||||
link,
|
||||
guid: e.attributes.url,
|
||||
description: e.attributes.description.standard + `<br><img src=${e.attributes.artwork.url.replace('{w}x{h}{c}.{f}', '320x0w.jpg')}>`,
|
||||
description: e.attributes.artwork ? e.attributes.description.standard + `<br><img src=${e.attributes.artwork.url.replace('{w}x{h}{c}.{f}', '320x0w.jpg')}>` : e.attributes.description.standard,
|
||||
title,
|
||||
pubDate: new Date().toUTCString(),
|
||||
};
|
||||
return result;
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user