This repository was archived by the owner on Nov 3, 2025. It is now read-only.
File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -6,7 +6,7 @@ import { Navigation } from './Navigation';
66
77export class FullScreenPortal extends ReactComponent {
88 fullScreenStack = fromStream (
9- Navigation . getInstance ( ) . fullScreenDelegate . fullSceenStack$
9+ Navigation . instance . fullScreenDelegate . fullSceenStack$
1010 ) ;
1111
1212 render ( ) {
Original file line number Diff line number Diff line change 11import { FullScreenDelegate } from './FullScreenDelegate' ;
22
33export class Navigation {
4- static getInstance ( ) {
5- if ( Navigation . instance ) {
6- return Navigation . instance ;
4+ static get instance ( ) {
5+ if ( Navigation . singleton ) {
6+ return Navigation . singleton ;
77 }
8- Navigation . instance = new Navigation ( ) ;
9- return Navigation . instance ;
8+ Navigation . singleton = new Navigation ( ) ;
9+ return Navigation . singleton ;
1010 }
11- private static instance : Navigation ;
11+ private static singleton : Navigation ;
1212
1313 fullScreenDelegate = new FullScreenDelegate ( ) ;
1414}
Original file line number Diff line number Diff line change @@ -2,8 +2,8 @@ import { Navigation } from '../Navigation';
22
33describe ( 'Navigation store' , ( ) => {
44 it ( 'exposes the same store instance if it accessed twice' , ( ) => {
5- const navigation = Navigation . getInstance ( ) ;
6- const otherNavigation = Navigation . getInstance ( ) ;
5+ const navigation = Navigation . instance ;
6+ const otherNavigation = Navigation . instance ;
77 expect ( otherNavigation ) . toBe ( navigation ) ;
88 } ) ;
99} ) ;
Original file line number Diff line number Diff line change @@ -102,7 +102,7 @@ export const createCanal = <
102102 */
103103 // @ts -ignore
104104 this . authorizations$ . next ( nextAuthorizations ) ;
105- Navigation . getInstance ( ) . fullScreenDelegate . canalsFullScreenStackProperties$ . next (
105+ Navigation . instance . fullScreenDelegate . canalsFullScreenStackProperties$ . next (
106106 this . fullScreenStackProperties$
107107 ) ;
108108 }
You can’t perform that action at this time.
0 commit comments