fix: handle empty guesstimate descriptions
This commit is contained in:
parent
1e357a75b8
commit
19779bca02
|
@ -22,7 +22,7 @@ const modelToQuestion = (model: any): ReturnType<typeof prepareQuestion> => {
|
||||||
title: model.name,
|
title: model.name,
|
||||||
url: `https://www.getguesstimate.com/models/${model.id}`,
|
url: `https://www.getguesstimate.com/models/${model.id}`,
|
||||||
// timestamp,
|
// timestamp,
|
||||||
description,
|
description: description || "",
|
||||||
options: [],
|
options: [],
|
||||||
qualityindicators: {
|
qualityindicators: {
|
||||||
numforecasts: 1,
|
numforecasts: 1,
|
||||||
|
@ -90,5 +90,5 @@ export const guesstimate: Platform & {
|
||||||
search,
|
search,
|
||||||
version: "v1",
|
version: "v1",
|
||||||
fetchQuestion,
|
fetchQuestion,
|
||||||
calculateStars: (q) => (q.description.length > 250 ? 2 : 1),
|
calculateStars: (q) => (q.description?.length > 250 ? 2 : 1),
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue
Block a user