[*Theme] Ignore failed CSS import urls

This commit is contained in:
Ducko 2021-07-17 21:07:06 +01:00 committed by Alyxia Sother
parent 11424b18eb
commit 0c8bdfb50d
No known key found for this signature in database
GPG key ID: 355968D14144B739

View file

@ -78,7 +78,13 @@ export default async (manifest, _content, repo) => {
console.log(x, url);
const imported = (await axios.get(url)).data;
let imported;
try {
imported = (await axios.get(url)).data;
} catch (e) {
console.log('failed to get css for', url);
continue;
}
variables = variables.concat(imported.match(/--([^*!\n}]*): ([^*\n}]*);/g) || []);
}