Skip to content

Commit

Permalink
Fix request permission option not being deselected
Browse files Browse the repository at this point in the history
  • Loading branch information
McGiverGim committed May 16, 2024
1 parent db85a9a commit a9c862a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 0 additions & 1 deletion src/components/port-picker/PortsInput.vue
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,6 @@ export default {
},
onChange(event) {
if (event.target.value === 'requestpermission') {
event.target.value = 'manual';
EventBus.$emit('ports-input:request-permission');
} else {
EventBus.$emit('ports-input:change', event.target.value);
Expand Down
3 changes: 3 additions & 0 deletions src/js/port_handler.js
Original file line number Diff line number Diff line change
Expand Up @@ -282,6 +282,9 @@ PortHandler.updatePortSelect = function (ports) {
PortHandler.askPermissionPort = function() {
serial.requestPermissionDevice().then(() => {
this.check_serial_devices();
}).catch(() => {
// In the catch we call the check_serial_devices too to change the request permission option from the select for other
this.check_serial_devices();
});
};

Expand Down

0 comments on commit a9c862a

Please sign in to comment.