From ddbd110cc72805b424655a47e3088877819af7f6 Mon Sep 17 00:00:00 2001 From: Ganesh Patil <7030871503ganeshpatil@gmail.com> Date: Thu, 26 Feb 2026 20:48:07 +0530 Subject: [PATCH] fix: replace deprecated substr() with substring() in url-options-manager\n\nReplace window.location.href.substr() with substring() and add a guard\nfor missing query string to prevent incorrect behavior when the URL\nhas no '?' character." --- .../phoenix-event-display/src/managers/url-options-manager.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/phoenix-event-display/src/managers/url-options-manager.ts b/packages/phoenix-event-display/src/managers/url-options-manager.ts index 74cb7e472..1a7d4fe74 100644 --- a/packages/phoenix-event-display/src/managers/url-options-manager.ts +++ b/packages/phoenix-event-display/src/managers/url-options-manager.ts @@ -32,8 +32,9 @@ export class URLOptionsManager { private eventDisplay: EventDisplay, private configuration: Configuration, ) { + const queryIndex = window.location.href.indexOf('?'); this.urlOptions = new URLSearchParams( - window.location.href.substr(window.location.href.lastIndexOf('?')), + queryIndex !== -1 ? window.location.href.substring(queryIndex) : '', ); }