mirror of
https://github.com/directus/directus.git
synced 2026-04-25 03:00:53 -04:00
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:
@@ -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]];
|
||||
|
||||
Reference in New Issue
Block a user