Skip to content

Commit afaca20

Browse files
authored
check if remote url is defined first (#2384)
1 parent f8b9e3e commit afaca20

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

agent/src/index.ts

+4-3
Original file line numberDiff line numberDiff line change
@@ -1101,9 +1101,10 @@ const checkPortAvailable = (port: number): Promise<boolean> => {
11011101
});
11021102
};
11031103

1104-
const hasValidRemoteUrls = () =>
1105-
process.env.REMOTE_CHARACTER_URLS != "" &&
1106-
process.env.REMOTE_CHARACTER_URLS.startsWith("http")
1104+
const hasValidRemoteUrls = () => {
1105+
const remoteUrls = process.env.REMOTE_CHARACTER_URLS;
1106+
return remoteUrls && remoteUrls !== "" && remoteUrls.startsWith('http');
1107+
};
11071108

11081109
const startAgents = async () => {
11091110
const directClient = new DirectClient();

0 commit comments

Comments
 (0)