Skip to content

Commit a74f912

Browse files
committed
Make protocol selection spec complaint
1 parent 432b3bb commit a74f912

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

main/lib/session.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -278,8 +278,8 @@ export class HttpWTSession {
278278
/** @type {Map<bigint,WebTransportSendGroup>} */
279279
this._sendGroupIndex = new Map()
280280

281-
/** @type {undefined|string} */
282-
this._selectedProtocol = undefined
281+
/** @type {string} */
282+
this._selectedProtocol = ''
283283
}
284284

285285
/**

main/lib/webtransport.browser.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -364,7 +364,7 @@ export class WebTransportPolyfill {
364364
}
365365

366366
get protocol() {
367-
return this.curtransport?.protocol || undefined
367+
return this.curtransport?.protocol || ''
368368
}
369369

370370
getStats() {

test/session.spec.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ describe('session', function () {
168168
console.log('Application protocol is not implemented skipping')
169169
return // not implemented is also fine
170170
}
171-
expect(client.protocol).to.equal(undefined)
171+
expect(client.protocol).to.equal('')
172172
await client.closed
173173
})
174174
if (browser !== 'chromium' && browser !== 'firefox' && browser !== 'webkit') {

0 commit comments

Comments
 (0)