зеркало из https://github.com/electron/electron.git
fix: `serial-port-added` should respect filters (#41635)
fix: serial-port-added should respect filters Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com> Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
This commit is contained in:
Родитель
417e16cedd
Коммит
78ce4c473b
|
@ -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) {
|
||||
|
|
Загрузка…
Ссылка в новой задаче