From 6145a9ef6908c0feb107ac41f704e0aabe2718d0 Mon Sep 17 00:00:00 2001 From: CommanderRoot Date: Thu, 21 Jul 2022 20:53:08 +0200 Subject: [PATCH] fix: replace deprecated String.prototype.substr() (#140) .substr() is deprecated so we replace it with .slice() which works similarily but isn't deprecated Signed-off-by: Tobias Speicher --- lib/tracker-group.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/tracker-group.js b/lib/tracker-group.js index 9da13f8..a3c7af8 100644 --- a/lib/tracker-group.js +++ b/lib/tracker-group.js @@ -103,7 +103,7 @@ TrackerGroup.prototype.finish = function () { var buffer = ' ' TrackerGroup.prototype.debug = function (depth) { depth = depth || 0 - var indent = depth ? buffer.substr(0, depth) : '' + var indent = depth ? buffer.slice(0, depth) : '' var output = indent + (this.name || 'top') + ': ' + this.completed() + '\n' this.trackers.forEach(function (tracker) { if (tracker instanceof TrackerGroup) {