badaix / snapweb

Web interface for Snapcast
GNU General Public License v3.0
86 stars 31 forks source link

Small bugfix for typescript compilation error #50

Closed WarrenWilkinson closed 9 months ago

WarrenWilkinson commented 11 months ago

I found a typescript error, this change fixes it:

$ make
tsc --build page/tsconfig.json
page/snapstream.ts:988:61 - error TS2345: Argument of type 'number' is not assignable to parameter of type '0 | 1'.

988         if ([WebSocket.OPEN, WebSocket.CONNECTING].includes(this.streamsocket.readyState)) {
                                                                ~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Found 1 error.

make: *** [Makefile:6: tsc] Error 1

Other userful details:

$ tsc --version
Version 5.1.6
$ node --version
v18.13.0
$ npm --version
9.2.0
badaix commented 9 months ago

Thanks!

badaix commented 9 months ago

Thanks, wanted to merge this into the react branch and found out that this is already fixed: 601f0333e2d8e5098fc77b0f36bfe515859d68f7