Skip to content

Commit 918eb6d

Browse files
committed
Protocol: add type check
Fixes: #1059
1 parent 4606d0e commit 918eb6d

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

lib/protocol/Protocol.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1669,6 +1669,9 @@ class Protocol {
16691669

16701670
const origSignal = name;
16711671

1672+
if (typeof origSignal !== 'string' || !origSignal)
1673+
throw new Error(`Invalid signal: ${origSignal}`);
1674+
16721675
let signal = name.toUpperCase();
16731676
if (signal.slice(0, 3) === 'SIG')
16741677
signal = signal.slice(3);

0 commit comments

Comments
 (0)