Skip to content

Commit d8eac19

Browse files
committed
FIXUP(formatter): account for creation_time being undefined sometimes
1 parent 7abfc27 commit d8eac19

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/formatter.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ class Formatter {
158158
workDict['content-type'] = dict['content_type'];
159159
workDict['content-encoding'] = dict['content_encoding'];
160160
workDict['absolute-expiry-time'] = dict['absolute_expiry_time'];
161-
workDict['creation-time'] = dict['creation_time'].getTime();
161+
workDict['creation-time'] = dict['creation_time']?.getTime();
162162
workDict['group-id'] = dict['group_id'];
163163
workDict['group-sequence'] = dict['group_sequence'];
164164
workDict['reply-to-group-id'] = dict['reply_to_group_id'];
@@ -211,7 +211,7 @@ class Formatter {
211211
workDict['content-type'] = dict['content_type'];
212212
workDict['content-encoding'] = dict['content_encoding'];
213213
workDict['absolute-expiry-time'] = dict['absolute_expiry_time'];
214-
workDict['creation-time'] = dict['creation_time'].getTime();
214+
workDict['creation-time'] = dict['creation_time']?.getTime();
215215
workDict['group-id'] = dict['group_id'];
216216
workDict['group-sequence'] = dict['group_sequence'];
217217
workDict['reply-to-group-id'] = dict['reply_to_group_id'];

0 commit comments

Comments
 (0)