Update top-langs.js

This commit is contained in:
Zohan Subhash
2023-01-16 15:43:03 +05:30
committed by GitHub
parent 2466713261
commit 42503cf90c
+10 -1
View File
@@ -28,7 +28,16 @@ export default async (req, res) => {
if (req.query.langs) {
const split = req.query.langs.split(";");
split.forEach(lang => {
topLangs.push(JSON.parse(decodeURIComponent(lang)))
let {
name = "No Name",
size = "0",
color,
} = JSON.parse(decodeURIComponent(lang))
topLangs.push({
name,
size,
color,
});
});
} else {
topLangs = [