@@ -48,27 +48,27 @@ export function DiffViewerLayoutComponent(): React.ReactElement {
4848 ) ;
4949}
5050
51- export const DiffViewerRenderer = ( _props : IDiffViewerProps ) => {
52- const props = merge ( {
51+ export const DiffViewerRenderer = ( props : IDiffViewerProps ) => {
52+ const mergedProps = merge ( {
5353 appConfig : { } ,
5454 runtimeConfig : {
55- onWillApplyTheme : _props . onWillApplyTheme ,
56- tabBarRightExtraContent : _props . tabBarRightExtraContent ,
55+ onWillApplyTheme : props . onWillApplyTheme ,
56+ tabBarRightExtraContent : props . tabBarRightExtraContent ,
5757 } as RuntimeConfig ,
58- } , _props ) as IAppRendererProps ;
58+ } , props ) as IAppRendererProps ;
5959
60- if ( ! props . appConfig . injector ) {
61- props . appConfig . injector = new Injector ( ) ;
60+ if ( ! mergedProps . appConfig . injector ) {
61+ mergedProps . appConfig . injector = new Injector ( ) ;
6262 }
6363
64- const injector = props . appConfig . injector ;
64+ const injector = mergedProps . appConfig . injector ;
6565
6666 injector . addProviders ( {
6767 token : IDiffViewerProps ,
68- useValue : props ,
68+ useValue : mergedProps ,
6969 } ) ;
7070
71- const appConfig = props . appConfig ;
71+ const appConfig = mergedProps . appConfig ;
7272
7373 let appModules : ModuleConstructor [ ] = appConfig ?. modules || [ ] ;
7474 if ( ! appModules . includes ( DiffViewerModule ) ) {
@@ -133,11 +133,13 @@ export const DiffViewerRenderer = (_props: IDiffViewerProps) => {
133133 } ,
134134 } ,
135135 } ) ,
136- } , props ) ;
136+ } , mergedProps ) ;
137137
138138 return (
139139 < AppRenderer
140140 { ...diffViewerAppConfig }
141141 />
142142 ) ;
143143} ;
144+
145+ export const DiffPreviewer = DiffViewerRenderer ;
0 commit comments