Minor bugfix in wakaValueText
This is the same user-facing behavior, but stops logging errors for items that are _expected_ to not have Waka data
This commit is contained in:
parent
a73427af1e
commit
d918162a2f
1 changed files with 5 additions and 3 deletions
|
@ -255,14 +255,16 @@ const resolvers = {
|
||||||
return item.createdAt && item.createdAt.toISOString();
|
return item.createdAt && item.createdAt.toISOString();
|
||||||
},
|
},
|
||||||
wakaValueText: async ({ id }, _, { itemWakaValueLoader }) => {
|
wakaValueText: async ({ id }, _, { itemWakaValueLoader }) => {
|
||||||
|
let wakaValue;
|
||||||
try {
|
try {
|
||||||
const wakaValue = await itemWakaValueLoader.load(id);
|
wakaValue = await itemWakaValueLoader.load(id);
|
||||||
return wakaValue.value;
|
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
console.error(`Error loading wakaValueText for item ${id}, skipping:`);
|
console.error(`Error loading wakaValueText for item ${id}, skipping:`);
|
||||||
console.error(e);
|
console.error(e);
|
||||||
return null;
|
wakaValue = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return wakaValue ? wakaValue.value : null;
|
||||||
},
|
},
|
||||||
|
|
||||||
currentUserOwnsThis: async (
|
currentUserOwnsThis: async (
|
||||||
|
|
Loading…
Reference in a new issue