Skip to content

Commit dbce0a7

Browse files
authored
Merge pull request #1969 from stackernews/fix-saloon-replies
Fix saloon replies
2 parents 2038701 + 4e62053 commit dbce0a7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

api/paidAction/itemCreate.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@ export async function getBaseCost ({ models, bio, parentId, subName }) {
2727
LEFT JOIN "Sub" s ON s.name = COALESCE(r."subName", i."subName")
2828
WHERE i.id = ${Number(parentId)}`
2929

30-
if (!sub) return DEFAULT_ITEM_COST
31-
return satsToMsats(sub.replyCost)
30+
if (sub?.replyCost) return satsToMsats(sub.replyCost)
31+
return DEFAULT_ITEM_COST
3232
}
3333

3434
const sub = await models.sub.findUnique({ where: { name: subName } })

0 commit comments

Comments
 (0)