Skip to content

Commit a577f56

Browse files
committed
refactor:cleanup
1 parent 1937c3d commit a577f56

1 file changed

Lines changed: 4 additions & 5 deletions

File tree

packages/react-native-detour/src/links/api/sendUniversalLinkClick.ts

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,10 @@ export type UniversalLinkClickResult =
2828
effectiveLimit?: number;
2929
};
3030

31-
const resolvePlatform = (): "ios" | "android" | "unknown" => {
32-
if (Platform.OS === "ios") return "ios";
33-
if (Platform.OS === "android") return "android";
34-
return "unknown";
35-
};
31+
type ClickPlatform = "ios" | "android" | "unknown";
32+
33+
const resolvePlatform = (): ClickPlatform =>
34+
Platform.OS === "ios" || Platform.OS === "android" ? Platform.OS : "unknown";
3635

3736
const extractParams = (url: string): Record<string, string> | undefined => {
3837
try {

0 commit comments

Comments
 (0)