cbschuld/monoprice-multizone-interface

Issue with ZonePowerVolumeControl.tsx

zolapop opened this issue · 2 comments

Thanks for updating this script recently. I really appreciate your work on this. I've complied on two machines today and gotten this error. Can you replicate?
error

/projects/monoprice-multizone-interface/src/ZonePowerVolumeControl.tsx
TypeScript error in /projects/monoprice-multizone-interface/src/ZonePowerVolumeControl.tsx(60,48):
Argument of type 'string | undefined' is not assignable to parameter of type 'string'.
Type 'undefined' is not assignable to type 'string'. TS2345

58 |                         style={{width:'48px'}}
59 |                         onChange={(selected:LabeledValue)=>{

60 | setSource(parseInt(selected.key));
| ^
61 | onSourceChange(info.zone,selected.key);
62 | }}
63 | value={{key:source.toString(),label:getSourceIcon()}}

@zolapop - so sorry; I attempted to fix this but I am not near my amp for the next few months and can't test it on live equipment. I am sending up what I believe is the fix now.

@zolapop - if you are able to update your branch to setSourceIssue and test it locally that would be awesome; otherwise I'll flag to test it in July. Thanks, Chris