diff --git a/TODO.md b/TODO.md index 0eed5d4d..d0170c99 100644 --- a/TODO.md +++ b/TODO.md @@ -45,7 +45,6 @@ - Fixes - Newlines and quote after newline in room subtitle - - Remove usage of `splice()` - Event delegates changing height don't scroll the list - When selecting text and scrolling up, selection stops working after a while - Ensure all the text that should be copied is copied diff --git a/src/qml/Chat/Composer.qml b/src/qml/Chat/Composer.qml index c86b13e6..0ac531d9 100644 --- a/src/qml/Chat/Composer.qml +++ b/src/qml/Chat/Composer.qml @@ -36,7 +36,7 @@ Rectangle { readonly property int deleteCharsOnBackspace: lineTextUntilCursor.match(/^ +$/) ? - lineTextUntilCursor.match(/ {1,4}/g).splice(-1)[0].length : + lineTextUntilCursor.match(/ {1,4}/g).slice(-1)[0].length : 1 // property var pr: lineTextUntilCursor diff --git a/src/qml/utils.js b/src/qml/utils.js index fe9cdd27..5975e6ae 100644 --- a/src/qml/utils.js +++ b/src/qml/utils.js @@ -289,6 +289,6 @@ function copyToClipboard(text) { function urlExtension(url) { - return url.toString().split("/").splice(-1)[0].split("?")[0].split(".") - .splice(-1)[0].toLowerCase() + return url.toString().split("/").slice(-1)[0].split("?")[0].split(".") + .slice(-1)[0].toLowerCase() }