refactor: replace deprecated String.prototype.substr() (#12344)

.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:
CommanderRoot
2022-03-25 18:36:18 +01:00
committed by GitHub
parent caf698ed2f
commit d81adcd674
6 changed files with 9 additions and 9 deletions

View File

@@ -10,7 +10,7 @@ import NavigationItem from './navigation-item.vue';
import navLinks from './links.yaml';
function spreadPath(path: string) {
const sections = path.substr(1).split('/');
const sections = path.slice(1).split('/');
if (sections.length === 0) return [];
const paths: string[] = ['/' + sections[0]];