File tree 1 file changed +13
-9
lines changed
1 file changed +13
-9
lines changed Original file line number Diff line number Diff line change @@ -752,15 +752,19 @@ const onDiffView = (commitSpec: CommitSpec, repo: Repo) => {
752
752
root : HTMLElement ,
753
753
onJsFile : ( jsFile : HTMLElement ) => Unsubscribable
754
754
) : Subscribable < never > =>
755
- new Observable ( _subscriber => {
756
- observeNewChildren ( root ) . subscribe ( el => {
757
- const elTeardown = new Subscription ( )
758
- if ( el . classList . contains ( 'js-file' ) ) elTeardown . add ( onJsFile ( el ) )
759
- if ( el . classList . contains ( 'js-diff-progressive-container' ) )
760
- elTeardown . add ( observeJsFilesUnder ( el , onJsFile ) . subscribe ( ) )
761
- return elTeardown
762
- } )
763
- } )
755
+ observeNewChildren ( root ) . pipe (
756
+ mergeMap (
757
+ el =>
758
+ new Observable ( _subscriber => {
759
+ const elTeardown = new Subscription ( )
760
+ if ( el . classList . contains ( 'js-file' ) ) elTeardown . add ( onJsFile ( el ) )
761
+ if ( el . classList . contains ( 'js-diff-progressive-container' ) )
762
+ elTeardown . add ( observeJsFilesUnder ( el , onJsFile ) . subscribe ( ) )
763
+ return elTeardown
764
+ } )
765
+ ) ,
766
+ ignoreElements ( )
767
+ )
764
768
765
769
const path2Anchor = new Map < string , string > ( )
766
770
const j2d = ( range : RepoCommitPathRange ) => {
You can’t perform that action at this time.
0 commit comments