Skip to content

Commit e09741f

Browse files
committed
check dc2 initialized
1 parent 34af584 commit e09741f

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

test/jest-tests/polyfill.test.ts

+4-1
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,10 @@ describe('polyfill', () => {
135135

136136
// Assign the binaryType value
137137
dc1.binaryType = current.binaryType as BinaryType;
138-
dc2.binaryType = current.binaryType as BinaryType;
138+
// dc2 also is initialized ?
139+
if(dc2){
140+
dc2.binaryType = current.binaryType as BinaryType;
141+
}
139142

140143
// Send the test message
141144
dc1.send(current.data);

0 commit comments

Comments
 (0)