diff --git a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/base_js.html.twig b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/base_js.html.twig index fbe3c0794314b..3764d9782acfb 100644 --- a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/base_js.html.twig +++ b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/base_js.html.twig @@ -351,7 +351,7 @@ if (typeof Sfjs === 'undefined' || typeof Sfjs.loadToolbar === 'undefined') { /* prevent logging AJAX calls to static and inline files, like templates */ var path = url; - if (url.substr(0, 1) === '/') { + if (url.startsWith('/')) { if (0 === url.indexOf('{{ request.basePath|e('js') }}')) { path = url.substr({{ request.basePath|length }}); }