Merge branch 'main' into glitch-soc/merge-upstream

This commit is contained in:
Claire
2022-04-06 16:06:15 +02:00
8 changed files with 45 additions and 36 deletions

View File

@@ -124,7 +124,7 @@ function search(value, { emojisToShowFilter, maxResults, include, exclude, custo
for (let id in aPool) {
let emoji = aPool[id],
{ search } = emoji,
sub = value.substr(0, length),
sub = value.slice(0, length),
subIndex = search.indexOf(sub);
if (subIndex !== -1) {

View File

@@ -32,7 +32,7 @@ const trim = (text, len) => {
return text;
}
return text.substring(0, cut) + (text.length > len ? '…' : '');
return text.slice(0, cut) + (text.length > len ? '…' : '');
};
const domParser = new DOMParser();

View File

@@ -91,7 +91,7 @@ export const fileNameFromURL = str => {
const pathname = url.pathname;
const index = pathname.lastIndexOf('/');
return pathname.substring(index + 1);
return pathname.slice(index + 1);
};
export default @injectIntl