From 350ea9fedb7941d1afc27b7b2545fc90cdfb61c0 Mon Sep 17 00:00:00 2001 From: Parker Lougheed Date: Thu, 17 Oct 2024 14:09:16 -0500 Subject: [PATCH] Use block function for _debugSessionForTab --- dwds/debug_extension/web/debug_session.dart | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/dwds/debug_extension/web/debug_session.dart b/dwds/debug_extension/web/debug_session.dart index 2bd998f28..2f4f5ad2c 100644 --- a/dwds/debug_extension/web/debug_session.dart +++ b/dwds/debug_extension/web/debug_session.dart @@ -651,13 +651,14 @@ Future _sendStopDebuggingMessage( ); } -_DebugSession? _debugSessionForTab(int tabId, {required TabType type}) => - switch (type) { - TabType.dartApp => - _debugSessions.firstWhereOrNull((session) => session.appTabId == tabId), - TabType.devTools => _debugSessions - .firstWhereOrNull((session) => session.devToolsTabId == tabId) - }; +_DebugSession? _debugSessionForTab(int tabId, {required TabType type}) { + return switch (type) { + TabType.dartApp => + _debugSessions.firstWhereOrNull((session) => session.appTabId == tabId), + TabType.devTools => _debugSessions + .firstWhereOrNull((session) => session.devToolsTabId == tabId) + }; +} Future _authenticateUser(int tabId) async { final isAlreadyAuthenticated = await _fetchIsAuthenticated(tabId);