File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -4,10 +4,10 @@ export const getCookie = (cookieName: string) => {
44 const ca = decodedCookie . split ( ";" ) ;
55 for ( let i = 0 ; i < ca . length ; i += 1 ) {
66 let c = ca [ i ] ;
7- while ( c . startsWith ( " " ) ) {
7+ while ( c . charAt ( 0 ) === " " ) {
88 c = c . substring ( 1 ) ;
99 }
10- if ( c . startsWith ( name ) ) {
10+ if ( c . indexOf ( name ) === 0 ) {
1111 return c . substring ( name . length , c . length ) ;
1212 }
1313 }
Original file line number Diff line number Diff line change @@ -50,8 +50,8 @@ export class HomeComponent implements OnInit {
5050 }
5151
5252 private getCurrentHost ( ) {
53- const host = globalThis . location . host ;
54- const url = `${ globalThis . location . protocol } //${ host } ` ;
53+ const host = window . location . host ;
54+ const url = `${ window . location . protocol } //${ host } ` ;
5555
5656 return url ;
5757 }
Original file line number Diff line number Diff line change @@ -7,7 +7,7 @@ export function secureApiInterceptor(
77) {
88 const secureRoutes = [ getApiUrl ( ) ] ;
99
10- if ( ! secureRoutes . some ( ( x ) => request . url . startsWith ( x ) ) ) {
10+ if ( ! secureRoutes . find ( ( x ) => request . url . startsWith ( x ) ) ) {
1111 return next ( request ) ;
1212 }
1313
@@ -28,7 +28,7 @@ function getApiUrl() {
2828}
2929
3030function getCurrentHost ( ) {
31- const host = globalThis . location . host ;
32- const url = `${ globalThis . location . protocol } //${ host } ` ;
31+ const host = window . location . host ;
32+ const url = `${ window . location . protocol } //${ host } ` ;
3333 return url ;
3434}
You can’t perform that action at this time.
0 commit comments