Skip to content

Commit ce28463

Browse files
committed
handle null values for un-sent messages
1 parent a13d1ba commit ce28463

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/main.jxa.js

+4
Original file line numberDiff line numberDiff line change
@@ -227,6 +227,10 @@ function resolveColorScheme(scheme = '') {
227227
}
228228

229229
function unserializeMessageBody(mBody) {
230+
if (!mBody.length) {
231+
return 'Message un-sent by chat participant.';
232+
}
233+
230234
const bytes = [];
231235
for (let c = 0; c < mBody.length; c += 2)
232236
bytes.push(parseInt(mBody.substr(c, 2), 16));

0 commit comments

Comments
 (0)