fmt(js): npm run fix on merge (#88206)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
2038d4034d
commit
cecb3a6ed7
@@ -280,8 +280,10 @@ function remoteRequestMatchesBaseUrl(requestUrl, baseUrl) {
|
||||
const request = new URL(requestUrl)
|
||||
const base = new URL(baseUrl)
|
||||
const basePath = base.pathname.replace(/\/+$/, '')
|
||||
|
||||
const requestProtocol =
|
||||
request.protocol === 'ws:' ? 'http:' : request.protocol === 'wss:' ? 'https:' : request.protocol
|
||||
|
||||
const baseProtocol = base.protocol === 'ws:' ? 'http:' : base.protocol === 'wss:' ? 'https:' : base.protocol
|
||||
|
||||
if (requestProtocol !== baseProtocol || request.host !== base.host) {
|
||||
|
||||
@@ -122,11 +122,7 @@ export function useSessionTileDelegate({
|
||||
// transcript or a stale pre-reconnect survivor; reusing it painted the
|
||||
// post-sleep/wake tile permanently empty. Fall through to a real
|
||||
// resume instead — it's idempotent for a genuinely live session.
|
||||
if (
|
||||
existing &&
|
||||
cached?.storedSessionId === storedSessionId &&
|
||||
(cached.busy || cached.messages.length > 0)
|
||||
) {
|
||||
if (existing && cached?.storedSessionId === storedSessionId && (cached.busy || cached.messages.length > 0)) {
|
||||
publishSessionState(existing, cached)
|
||||
|
||||
return existing
|
||||
|
||||
@@ -38,7 +38,9 @@ describe('resetTileRuntimeBindings', () => {
|
||||
resetTileRuntimeBindings()
|
||||
|
||||
expect(invalidateRuntimeBindings).toHaveBeenCalledTimes(1)
|
||||
expect($sessionTiles.get()).toEqual([{ anchor: undefined, before: undefined, dir: undefined, storedSessionId: 'stored-a' }])
|
||||
expect($sessionTiles.get()).toEqual([
|
||||
{ anchor: undefined, before: undefined, dir: undefined, storedSessionId: 'stored-a' }
|
||||
])
|
||||
})
|
||||
|
||||
it('tolerates a delegate without invalidateRuntimeBindings (older wiring)', () => {
|
||||
|
||||
Reference in New Issue
Block a user