File tree Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -5,17 +5,17 @@ import ChartMonitor from 'redux-devtools-chart-monitor';
55import SliderMonitor from 'redux-slider-monitor' ;
66import DiffMonitor from './DiffMonitor' ;
77
8+ const monitorTypes = location . hash ? location . hash . substr ( 1 ) . split ( '/' ) : { } ;
9+
810function getMonitor ( ) {
9- if ( ! location . hash ) return LogMonitor ;
10- const monitorTypes = location . hash . substr ( 1 ) . split ( '/' ) ;
1111 switch ( monitorTypes [ 0 ] ) {
12- case 'SliderMonitor' : return SliderMonitor ;
13- case 'ChartMonitor' : return ChartMonitor ;
14- case 'DiffMonitor' : return DiffMonitor ;
15- default : return LogMonitor ;
12+ case 'SliderMonitor' : return createElement ( SliderMonitor ) ;
13+ case 'ChartMonitor' : return createElement ( ChartMonitor ) ;
14+ case 'DiffMonitor' : return createElement ( DiffMonitor ) ;
15+ default : return createElement ( LogMonitor , { preserveScrollTop : false } ) ;
1616 }
1717}
1818
1919export default ( props ) => (
20- < FilterMonitor { ...props } > { createElement ( getMonitor ( ) ) } </ FilterMonitor >
20+ < FilterMonitor { ...props } > { getMonitor ( ) } </ FilterMonitor >
2121) ;
You can’t perform that action at this time.
0 commit comments