@@ -1462,7 +1462,7 @@ function web_editor(config) {
1462
1462
$ ( '#flashing-overlay' ) . keydown ( function ( e ) {
1463
1463
if ( e . which == 27 ) {
1464
1464
flashErrorClose ( ) ;
1465
- }
1465
+ }
1466
1466
} ) ;
1467
1467
1468
1468
// Send event
@@ -1498,17 +1498,13 @@ function web_editor(config) {
1498
1498
1499
1499
var p = Promise . resolve ( ) ;
1500
1500
1501
- if ( usePartialFlashing ) {
1502
- if ( window . dapwrapper ) {
1503
- console . log ( "Disconnecting: Using Quick Flash" ) ;
1504
- p = p . then ( function ( ) { window . dapwrapper . disconnectAsync ( ) } ) ;
1505
- }
1501
+ if ( usePartialFlashing && window . dapwrapper ) {
1502
+ console . log ( 'Disconnecting: Using Quick Flash' ) ;
1503
+ p = p . then ( function ( ) { return window . dapwrapper . disconnectAsync ( ) } ) ;
1506
1504
}
1507
- else {
1508
- if ( window . daplink ) {
1509
- console . log ( "Disconnecting: Using Full Flash" ) ;
1510
- p = p . then ( function ( ) { window . daplink . disconnect ( ) } ) ;
1511
- }
1505
+ else if ( window . daplink ) {
1506
+ console . log ( 'Disconnecting: Using Full Flash' ) ;
1507
+ p = p . then ( function ( ) { return window . daplink . disconnect ( ) } ) ;
1512
1508
}
1513
1509
1514
1510
p . finally ( function ( ) {
@@ -1615,15 +1611,15 @@ function web_editor(config) {
1615
1611
1616
1612
function closeSerial ( keepSession ) {
1617
1613
console . log ( "Closing Serial Terminal" ) ;
1618
- $ ( " #repl" ) . empty ( ) ;
1619
- $ ( " #repl" ) . hide ( ) ;
1620
- $ ( " #request-repl" ) . hide ( ) ;
1621
- $ ( " #request-serial" ) . hide ( ) ;
1622
- $ ( " #editor-container" ) . show ( ) ;
1614
+ $ ( ' #repl' ) . empty ( ) ;
1615
+ $ ( ' #repl' ) . hide ( ) ;
1616
+ $ ( ' #request-repl' ) . hide ( ) ;
1617
+ $ ( ' #request-serial' ) . hide ( ) ;
1618
+ $ ( ' #editor-container' ) . show ( ) ;
1623
1619
1624
- var serialButton = config [ " translate" ] [ " static-strings" ] [ " buttons" ] [ " command-serial" ] ;
1625
- $ ( " #command-serial" ) . attr ( " title" , serialButton [ " title" ] ) ;
1626
- $ ( " #command-serial > .roundlabel" ) . text ( serialButton [ " label" ] ) ;
1620
+ var serialButton = config [ ' translate' ] [ ' static-strings' ] [ ' buttons' ] [ ' command-serial' ] ;
1621
+ $ ( ' #command-serial' ) . attr ( ' title' , serialButton [ ' title' ] ) ;
1622
+ $ ( ' #command-serial > .roundlabel' ) . text ( serialButton [ ' label' ] ) ;
1627
1623
1628
1624
var daplink = usePartialFlashing ? window . dapwrapper . daplink : window . daplink ;
1629
1625
daplink . stopSerialRead ( ) ;
@@ -1737,8 +1733,8 @@ function web_editor(config) {
1737
1733
$ ( overlayContainer ) . keydown ( function ( e ) {
1738
1734
if ( e . which == 27 ) {
1739
1735
modalMsgClose ( ) ;
1740
- }
1741
- } ) ;
1736
+ }
1737
+ } ) ;
1742
1738
}
1743
1739
1744
1740
function formatMenuContainer ( parentButtonId , containerId ) {
0 commit comments