home/natto/ags: fix weather

Signed-off-by: Amneesh Singh <natto@weirdnatto.in>
This commit is contained in:
2024-06-01 18:12:13 +05:30
parent f6f228f990
commit 5af717ac53
2 changed files with 4 additions and 1 deletions

View File

@@ -47,7 +47,7 @@ export default () => {
},
Widget.Icon({
icon: data.bind().as((d) => {
const condition = d?.["weatherDesc"]?.[0]?.["value"];
const condition = d?.["weatherDesc"]?.[0]?.["value"]?.split(/[\s,]+/)?.[0];
return `weather-${conditionIcons[condition]}-symbolic`;
}),
}),