Do not use unsupported forEach.

This commit is contained in:
bichanna 2021-12-04 10:24:00 -06:00 committed by GitHub
parent 48ba11d6a1
commit 7ea4f0f7d9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -36,11 +36,12 @@ const FontsBlock = () => {
} }
let fontStr = ''; let fontStr = '';
fontList.forEach((item) => { for (var i=0; i < fontList.length; i++) {
var item = fontList[i];
if (detect(item.font)) { if (detect(item.font)) {
fontStr += `${item.font}, `; fontStr += `${item.font}`
} }
}); }
fontsEl.textContent = fontStr.slice(0, -2); fontsEl.textContent = fontStr.slice(0, -2);
}, []); }, []);