fix(utils/typeCast): Ensure field.packet is defined

Apparently this can be undefined.
This commit is contained in:
Linden committed 2022-02-11 05:15:29 +11:00
1 parent 7096237ce2
commit 3cfa080cfc
1 file changed
+1 -1
+1 -1
View File
@@ -27,7 +27,7 @@ export const typeCast = (field: Field, next: () => void) => {
case 'MEDIUM_BLOB':
case 'LONG_BLOB':
case 'BLOB':
if (field.packet.charsetNr === 63) {
if (field.packet?.charsetNr === 63) {
return [...field.buffer()];
}
return field.string();