Merge pull request #264 from CommanderRoot/rm-deprecated-substr

Replace deprecated String.prototype.substr()
This commit is contained in:
Michael Telatynski
2022-06-09 13:54:22 +01:00
committed by GitHub
6 changed files with 11 additions and 11 deletions
+1 -1
View File
@@ -139,7 +139,7 @@ export class ClientViewModel extends ViewModel {
let label = preferredWebInstance;
const subDomainIdx = preferredWebInstance.lastIndexOf(".", preferredWebInstance.lastIndexOf("."));
if (subDomainIdx !== -1) {
label = preferredWebInstance.substr(preferredWebInstance.length - subDomainIdx + 1);
label = preferredWebInstance.slice(preferredWebInstance.length - subDomainIdx + 1);
}
return `Hosted by ${label}`;
}