fix: serial-port-added should respect filters (#41621)

fix: serial-port-added should respect filters
This commit is contained in:
Shelley Vohr 2024-03-20 15:18:41 +01:00 committed by GitHub
parent 433d6c33d8
commit 66dec24e32
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -93,6 +93,9 @@ api::Session* SerialChooserController::GetSession() {
void SerialChooserController::OnPortAdded(
const device::mojom::SerialPortInfo& port) {
if (!FilterMatchesAny(port))
return;
ports_.push_back(port.Clone());
api::Session* session = GetSession();
if (session) {