From b09dd8e7860cb494772dc83072fe5972fc4d4e4a Mon Sep 17 00:00:00 2001 From: Tobias Speicher Date: Mon, 4 Apr 2022 11:09:33 +0200 Subject: [PATCH] Replace deprecated String.prototype.substr() .substr() is deprecated so we replace it with .slice() which works similarily but isn't deprecated Signed-off-by: Tobias Speicher --- js/models/addressBook_model.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/js/models/addressBook_model.js b/js/models/addressBook_model.js index 649f308dc..c34fb3e53 100644 --- a/js/models/addressBook_model.js +++ b/js/models/addressBook_model.js @@ -44,14 +44,14 @@ angular.module('contactsApp') if (href.startsWith('principal:principals/users/')) { this.sharedWith.users.push({ - id: href.substr(27), - displayname: href.substr(27), + id: href.slice(27), + displayname: href.slice(27), writable: readWrite }); } else if (href.startsWith('principal:principals/groups/')) { this.sharedWith.groups.push({ - id: href.substr(28), - displayname: href.substr(28), + id: href.slice(28), + displayname: href.slice(28), writable: readWrite }); } @@ -62,7 +62,7 @@ angular.module('contactsApp') //if (typeof owner !== 'undefined' && owner.length !== 0) { // owner = owner.trim(); // if (owner.startsWith('/remote.php/dav/principals/users/')) { - // this._properties.owner = owner.substr(33); + // this._properties.owner = owner.slice(33); // } //}