File tree Expand file tree Collapse file tree 1 file changed +11
-4
lines changed Expand file tree Collapse file tree 1 file changed +11
-4
lines changed Original file line number Diff line number Diff line change 210
210
let model = document . querySelector ( '#printerModel option:checked' ) . textContent ;
211
211
let errors = document . querySelector ( '#errors' ) ;
212
212
213
- encoder = new ReceiptPrinterEncoder ( {
214
- printerModel : printerModel . value
215
- } ) ;
213
+ let encoderOptions = { } ;
214
+
215
+ if ( printerModel . value ) {
216
+ encoderOptions . printerModel = printerModel . value ;
217
+ }
218
+
219
+ encoder = new ReceiptPrinterEncoder ( encoderOptions ) ;
216
220
217
221
let script_ended = false ;
218
222
let script_error = null ;
930
934
< option value ="115200 "> 115200</ option >
931
935
</ select >
932
936
933
- < select id ="printerModel " onchange ="updatePreview() "> </ select >
937
+ < select id ="printerModel " onchange ="updatePreview() ">
938
+ < option value =""> Generic</ option >
939
+ < hr >
940
+ </ select >
934
941
935
942
< button id ="connect " onclick ="connect() ">
936
943
< svg xmlns ="http://www.w3.org/2000/svg " viewBox ="0 0 30 30 ">
You can’t perform that action at this time.
0 commit comments