Skip to content

Commit 401662f

Browse files
committed
refactor: remove unnecessary assertion
1 parent 941401d commit 401662f

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/android.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ export async function androidPortForward(
1919
systemPort: number,
2020
devicePort: number,
2121
) {
22-
await adb.forwardPort(systemPort!, devicePort);
22+
await adb.forwardPort(systemPort, devicePort);
2323
}
2424

2525
export async function androidRemovePortForward(adb: ADB, systemPort: number) {

src/utils.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -161,13 +161,13 @@ export async function fetchFlutterServerPort(
161161
`Checking if flutter server is running on port ${systemPort || devicePort} for simulator with id ${udid}`,
162162
);
163163
await waitForFlutterServer.bind(this)(
164-
(systemPort || devicePort)!,
164+
(systemPort || devicePort),
165165
packageName,
166166
);
167167
this.log.info(
168168
`Flutter server is successfully running on port ${systemPort || devicePort}`,
169169
);
170-
return (systemPort || devicePort)!;
170+
return (systemPort || devicePort);
171171
} catch (e) {
172172
return null;
173173
}

0 commit comments

Comments
 (0)