Fix identifier extraction from certain Twitter links

This commit is contained in:
shinigami-eyes 2020-12-26 06:55:09 +00:00
parent 3d3ab98c5d
commit ecc8719776
1 changed files with 1 additions and 0 deletions

View File

@ -455,6 +455,7 @@ function tryUnwrapNestedURL(url: URL): URL {
// const values = url.searchParams.values()
// HACK: values(...) is not iterable on facebook (babel polyfill?)
const values = url.search.split('&').map(x => {
if (x.startsWith('ref_url=')) return '';
const eq = x.indexOf('=');
return eq == -1 ? '' : decodeURIComponent(x.substr(eq + 1));
});