You've already forked matrix-js-sdk
mirror of
https://github.com/matrix-org/matrix-js-sdk.git
synced 2025-11-23 17:02:25 +03:00
Replace deprecated String.prototype.substr() (#2298)
.substr() is deprecated so we replace it with .slice() which works similarily but isn't deprecated Signed-off-by: Tobias Speicher <rootcommander@gmail.com>
This commit is contained in:
@@ -36,7 +36,7 @@ import {
|
||||
function matchesWildcard(actualValue: string, filterValue: string): boolean {
|
||||
if (filterValue.endsWith("*")) {
|
||||
const typePrefix = filterValue.slice(0, -1);
|
||||
return actualValue.substr(0, typePrefix.length) === typePrefix;
|
||||
return actualValue.slice(0, typePrefix.length) === typePrefix;
|
||||
} else {
|
||||
return actualValue === filterValue;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user