Skip to content

Commit fc0bffc

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

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
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: 3 additions & 3 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
}
@@ -337,7 +337,7 @@ function readManifest(): StringRecord {
337337
node.getModuleRootSync(
338338
'appium-flutter-integration-driver',
339339
__filename,
340-
)!,
340+
),
341341
'package.json',
342342
),
343343
{ encoding: 'utf8' },

0 commit comments

Comments
 (0)