Fixed double-complete errors after upgrading to RxJS 7.3

This commit is contained in:
squidfunk
2021-08-04 21:19:56 +02:00
parent 6ac55d485e
commit b07e466bec
25 changed files with 58 additions and 91 deletions

View File

@@ -31,7 +31,6 @@ import {
} from "rxjs"
import {
distinctUntilKeyChanged,
finalize,
map,
switchMap,
tap,
@@ -177,7 +176,6 @@ export function mountCodeBlock(
return watchCodeBlock(el, options)
.pipe(
tap(internal$),
finalize(() => internal$.complete()),
map(state => ({ ref: el, ...state }))
)
}

View File

@@ -23,7 +23,6 @@
import { Observable, Subject } from "rxjs"
import {
filter,
finalize,
map,
mapTo,
mergeWith,
@@ -109,7 +108,6 @@ export function mountDetails(
return watchDetails(el, options)
.pipe(
tap(internal$),
finalize(() => internal$.complete()),
mapTo({ ref: el })
)
}

View File

@@ -29,7 +29,6 @@ import {
} from "rxjs"
import {
delay,
finalize,
map,
observeOn,
switchMap,
@@ -133,7 +132,6 @@ export function mountDialog(
return watchDialog(el, options)
.pipe(
tap(internal$),
finalize(() => internal$.complete()),
map(state => ({ ref: el, ...state }))
)
}

View File

@@ -28,7 +28,6 @@ import {
} from "rxjs"
import {
distinctUntilKeyChanged,
finalize,
map,
observeOn,
tap
@@ -141,7 +140,6 @@ export function mountHeaderTitle(
return watchHeaderTitle(headline, options)
.pipe(
tap(internal$),
finalize(() => internal$.complete()),
map(state => ({ ref: el, ...state }))
)
}

View File

@@ -27,7 +27,6 @@ import {
of
} from "rxjs"
import {
finalize,
map,
mapTo,
mergeMap,
@@ -142,7 +141,6 @@ export function mountPalette(
return watchPalette(inputs)
.pipe(
tap(internal$),
finalize(() => internal$.complete()),
map(state => ({ ref: el, ...state }))
)
}

View File

@@ -32,7 +32,6 @@ import {
distinctUntilChanged,
distinctUntilKeyChanged,
filter,
finalize,
map,
take,
takeLast,
@@ -174,7 +173,6 @@ export function mountSearchQuery(
return watchSearchQuery(el, { tx$, rx$ })
.pipe(
tap(internal$),
finalize(() => internal$.complete()),
map(state => ({ ref: el, ...state }))
)
}

View File

@@ -30,7 +30,6 @@ import {
import {
bufferCount,
filter,
finalize,
map,
observeOn,
switchMap,
@@ -154,7 +153,6 @@ export function mountSearchResult(
return result$
.pipe(
tap(internal$),
finalize(() => internal$.complete()),
map(state => ({ ref: el, ...state }))
)
}

View File

@@ -25,11 +25,7 @@ import {
Subject,
fromEvent
} from "rxjs"
import {
finalize,
map,
tap
} from "rxjs/operators"
import { map, tap } from "rxjs/operators"
import { getLocation } from "~/browser"
@@ -117,7 +113,6 @@ export function mountSearchShare(
return watchSearchShare(el, options)
.pipe(
tap(internal$),
finalize(() => internal$.complete()),
map(state => ({ ref: el, ...state }))
)
}

View File

@@ -30,7 +30,6 @@ import {
combineLatestWith,
distinctUntilChanged,
filter,
finalize,
map,
observeOn,
tap
@@ -146,7 +145,6 @@ export function mountSearchSuggest(
return result$
.pipe(
tap(internal$),
finalize(() => internal$.complete()),
map(() => ({ ref: el }))
)
}

View File

@@ -28,7 +28,6 @@ import {
} from "rxjs"
import {
distinctUntilChanged,
finalize,
map,
observeOn,
tap,
@@ -159,7 +158,6 @@ export function mountSidebar(
return watchSidebar(el, options)
.pipe(
tap(internal$),
finalize(() => internal$.complete()),
map(state => ({ ref: el, ...state }))
)
}

View File

@@ -24,7 +24,6 @@ import { NEVER, Observable, Subject, defer, of } from "rxjs"
import {
catchError,
filter,
finalize,
map,
shareReplay,
tap
@@ -119,7 +118,6 @@ export function mountSource(
return watchSource(el)
.pipe(
tap(internal$),
finalize(() => internal$.complete()),
map(state => ({ ref: el, ...state }))
)
}

View File

@@ -23,7 +23,6 @@
import { Observable, Subject, animationFrameScheduler } from "rxjs"
import {
distinctUntilKeyChanged,
finalize,
map,
observeOn,
switchMap,
@@ -137,7 +136,6 @@ export function mountTabs(
return watchTabs(el, options)
.pipe(
tap(internal$),
finalize(() => internal$.complete()),
map(state => ({ ref: el, ...state }))
)
}

View File

@@ -30,7 +30,6 @@ import {
bufferCount,
distinctUntilChanged,
distinctUntilKeyChanged,
finalize,
map,
observeOn,
scan,
@@ -269,7 +268,6 @@ export function mountTableOfContents(
return watchTableOfContents(anchors, options)
.pipe(
tap(internal$),
finalize(() => internal$.complete()),
map(state => ({ ref: el, ...state }))
)
}

View File

@@ -30,7 +30,6 @@ import {
bufferCount,
distinctUntilChanged,
distinctUntilKeyChanged,
finalize,
map,
observeOn,
tap,
@@ -172,7 +171,6 @@ export function mountBackToTop(
return watchBackToTop(el, { viewport$, header$, main$ })
.pipe(
tap(internal$),
finalize(() => internal$.complete()),
map(state => ({ ref: el, ...state }))
)
}