Skip to content

Commit e312bc6

Browse files
Move simpleAttributes const inside only place it’s used
And define it more simply.
1 parent 48ede7f commit e312bc6

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/common/lib/types/protocolmessage.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,6 @@ function toStringArray(array?: any[]): string {
5858
return '[ ' + result.join(', ') + ' ]';
5959
}
6060

61-
const simpleAttributes = 'id channel channelSerial connectionId count msgSerial timestamp'.split(' ');
62-
6361
class ProtocolMessage {
6462
action?: number;
6563
flags?: number;
@@ -133,6 +131,7 @@ class ProtocolMessage {
133131
let result = '[ProtocolMessage';
134132
if (msg.action !== undefined) result += '; action=' + ProtocolMessage.ActionName[msg.action] || msg.action;
135133

134+
const simpleAttributes = ['id', 'channel', 'channelSerial', 'connectionId', 'count', 'msgSerial', 'timestamp'];
136135
let attribute;
137136
for (let attribIndex = 0; attribIndex < simpleAttributes.length; attribIndex++) {
138137
attribute = simpleAttributes[attribIndex];

0 commit comments

Comments
 (0)