From d963452c48ea6e4c7f995d9cdbc23cc2efda2069 Mon Sep 17 00:00:00 2001 From: Tobias Speicher Date: Fri, 18 Mar 2022 01:12:19 +0100 Subject: [PATCH] Replace deprecated String.prototype.substr() String.prototype.substr() is deprecated (see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/substr) so we replace it with slice() which works similarily but isn't deprecated. Signed-off-by: Tobias Speicher --- jsdoc/template/tmpl/properties.tmpl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jsdoc/template/tmpl/properties.tmpl b/jsdoc/template/tmpl/properties.tmpl index 8f2e4a3..cd3c9a1 100644 --- a/jsdoc/template/tmpl/properties.tmpl +++ b/jsdoc/template/tmpl/properties.tmpl @@ -7,7 +7,7 @@ props.forEach(function(prop, i) { if (!prop) { return; } if ( parentProp && prop.name && prop.name.indexOf(parentProp.name + '.') === 0 ) { - prop.name = prop.name.substr(parentProp.name.length+1); + prop.name = prop.name.slice(parentProp.name.length+1); parentProp.subprops = parentProp.subprops || []; parentProp.subprops.push(prop); props[i] = null;