From 20010a9ea62fb3dacd7d8fd8c6ee5a53b5820455 Mon Sep 17 00:00:00 2001 From: sunnylqm Date: Mon, 7 Apr 2025 19:56:17 +0800 Subject: [PATCH] Update version to 1.43.1 and handle optional chaining for origin URL in getCommitInfo function --- package.json | 2 +- src/utils/git.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 97c1df4..de6e76b 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "react-native-update-cli", - "version": "1.43.0", + "version": "1.43.1", "description": "command line tool for react-native-update (remote updates for react native)", "main": "index.js", "bin": { diff --git a/src/utils/git.ts b/src/utils/git.ts index cef9309..a03a5ea 100644 --- a/src/utils/git.ts +++ b/src/utils/git.ts @@ -41,7 +41,7 @@ export async function getCommitInfo(): Promise { message: commit.message, author: commit.author.name || commit.committer.name, timestamp: String(commit.committer.timestamp), - origin: origin.url, + origin: origin?.url, }; } catch (error) { console.error(error);