Skip to content

Commit 58c00a1

Browse files
committed
fix(QWeather): null check for locationInfo
1 parent 33a7ff2 commit 58c00a1

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/class/QWeather.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -889,7 +889,7 @@ export default class QWeather {
889889
}
890890

891891
// Some locationID at Hong Kong and Macau with length 9 is supported
892-
if (locationInfo.iso === "TW" || locationInfo.id.length !== 9) {
892+
if (!locationInfo || locationInfo.iso === "TW" || locationInfo.id.length !== 9) {
893893
Console.error("YesterdayAirQuality", "Unsupported location");
894894
return failedAirQuality;
895895
}

0 commit comments

Comments
 (0)