Skip to content

Commit c22e831

Browse files
committed
preprocess check
1 parent 5f1f939 commit c22e831

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

lib/rooms/WaitingRoom.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -795,8 +795,10 @@ WaitingRoom.prototype.parseSettings = function(settings) {
795795
throw new TypeError(where + 'REMOTE_DISPATCH invalid ' +
796796
'or missing url. Found: ' + r);
797797
}
798-
// TODO check function.
799-
// if (r.preprocess && 'function' !== typeof r.preprocess)
798+
if (r.preprocess && 'function' !== typeof r.preprocess) {
799+
throw new TypeError(where + 'REMOTE_DISPATCH.preprocess must be ' +
800+
'function or undefined. Found: ' + r.preprocess);
801+
}
800802
this.REMOTE_DISPATCH = r;
801803
}
802804

0 commit comments

Comments
 (0)