Skip to content

Commit 13a5c81

Browse files
committed
copilot review comments
Signed-off-by: Jonah Iden <[email protected]>
1 parent 8747456 commit 13a5c81

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

packages/open-collaboration-service-process/Readme.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,9 @@ node ./lib/process.js --server-address http://localhost:8100 --auth-token <your-
2323
### Communication Protocol
2424

2525
All communication happens via JSON-RPC 2.0 messages over stdin/stdout.
26-
See [messages.ts](src/messages.ts) for service process specific awarness or lifecycle messages. Other messages follow the open-collaboration-protocol.
26+
See [messages.ts](src/messages.ts) for service process specific awareness or lifecycle messages. Other messages follow the open-collaboration-protocol.
2727

28-
For specific examples see `service.process.test.ts` or the [IntellIj integration](https://github.com/eclipse-oct/oct-intellij)
28+
For specific examples see `service.process.test.ts` or the [IntellIJ integration](https://github.com/eclipse-oct/oct-intellij)
2929

3030
### Sending and Receiving Binary Data
3131

packages/open-collaboration-service-process/src/message-handler.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ export class MessageHandler {
6565
return fromBinaryMessage(param.data);
6666
}
6767
return param;
68-
});;
68+
});
6969

7070
if(metaDataParam === 'broadcast') {
7171
this.currentCollaborationInstance?.octConnection.sendBroadcast(method, ...messageParams);

packages/open-collaboration-service-process/src/messages.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ export namespace BinaryData {
150150
}
151151

152152
export function shouldConvert(message: unknown): boolean {
153-
if (typeof message !== 'object' && message !== null) {
153+
if (typeof message !== 'object' || message === null) {
154154
return false;
155155
}
156156

@@ -162,7 +162,7 @@ export namespace BinaryData {
162162
return message.some((item) => shouldConvert(item));
163163
}
164164

165-
return Object.keys(message!).some((key) => shouldConvert((message as Record<string, unknown>)[key]));
165+
return Object.keys(message).some((key) => shouldConvert((message as Record<string, unknown>)[key]));
166166
}
167167
}
168168

0 commit comments

Comments
 (0)