Merge pull request #457 from gyto23/gh-pages-ie11-fix

Fix ie11 arrow function causing not to show browser detection on demo
This commit is contained in:
Faisal Salman 2020-12-01 10:32:48 +07:00 committed by GitHub
commit 5af1e70987
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -325,12 +325,11 @@
const paramString = location.search.split('?')[1];
if (paramString) {
const params = paramString.split('&');
const obj = params.reduce((acc, cur, i) => {
return params.reduce(function(acc, cur) {
const [key, value] = cur.includes('=') ? cur.split('=') : [cur, null];
acc[key] = value;
return acc;
}, {});
return obj;
}
return {};
}