about summary refs log tree commit diff
path: root/app/javascript/flavours/glitch/util
diff options
context:
space:
mode:
authorCommanderRoot <CommanderRoot@users.noreply.github.com>2022-04-04 18:19:45 +0200
committerClaire <claire.github-309c@sitedethib.com>2022-04-06 16:08:33 +0200
commit9b95077885c4a7c03e9f4124f81cd39e2c6cbf26 (patch)
tree1f53d6804f4a4b81e51729f988cd2e76d0058bab /app/javascript/flavours/glitch/util
parentc02644ef10ba55a3b1af2fcc4e1780a940c0369f (diff)
[Glitch] Replace deprecated String.prototype.substr()
Port 0ec695e036dab45d57598f451266bd0b176df9fd to glitch-soc

Signed-off-by: Tobias Speicher <rootcommander@gmail.com>
Signed-off-by: Claire <claire.github-309c@sitedethib.com>
Diffstat (limited to 'app/javascript/flavours/glitch/util')
-rw-r--r--app/javascript/flavours/glitch/util/emoji/emoji_mart_search_light.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/javascript/flavours/glitch/util/emoji/emoji_mart_search_light.js b/app/javascript/flavours/glitch/util/emoji/emoji_mart_search_light.js
index e4519a13e..70694ab6d 100644
--- a/app/javascript/flavours/glitch/util/emoji/emoji_mart_search_light.js
+++ b/app/javascript/flavours/glitch/util/emoji/emoji_mart_search_light.js
@@ -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) {