My page works fine in Chrome and Firefox:
However, when I try to load this page in Edge, the questions and answers disappear. Only the categories are posted. Also, when trying to load this page in IE, everything disappears except for the search bar.
Edge gives me the following error:
SCRIPT1028: SCRIPT1028: Expected identifier, string or number on line 84 of faq.html
This refers to the following code:
function sortByCategory(data) {
return data.reduce((obj, c) => {
const { category, ...rest } = c; // this line throws the error
obj[category] = obj[category] || [];
obj[category].push(rest);
return obj;
}, {});
}
How do I fix this?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…