Skip to content

Commit b46a346

Browse files
committed
strings must use singlequotes
1 parent 2393395 commit b46a346

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

app.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ app.get('/:country', (req, res) => {
157157
const emojis = req.query.emojis === 'true';
158158
const source = req.query.source ? Number(req.query.source) : 2;
159159

160-
if (!country || country.toUpperCase() === 'ALL' || country.includes(",")) {
160+
if (!country || country.toUpperCase() === 'ALL' || country.includes(',')) {
161161
if (format.toLowerCase() === 'json') {
162162
return getWorldoMetersTable({ countryCode: country, isCurl, emojis, minimal, format }).then(result => {
163163
return res.json(result);

lib/api.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ exports.getWorldoMetersData = async (countryCode = 'ALL') => {
8989
let finalData = result.data;
9090
if (countryCode && countryCode !== 'ALL') {
9191
// extra filter to cater for trailing comma, ie /gb,
92-
finalData = finalData.filter((obj) => countryCode.toLowerCase().split(",").filter((obj) => obj.length > 1).includes(obj.countryCode.toLowerCase()));
92+
finalData = finalData.filter((obj) => countryCode.toLowerCase().split(',').filter((obj) => obj.length > 1).includes(obj.countryCode.toLowerCase()));
9393
}
9494
const returnObj = { data: finalData, worldStats };
9595

0 commit comments

Comments
 (0)