mirror of
https://github.com/meteor/meteor.git
synced 2026-05-02 03:01:46 -04:00
Fix undefined forEach error in tiny test
This commit is contained in:
@@ -1,5 +1,3 @@
|
||||
var url = Npm.require('url');
|
||||
|
||||
// By default, we use the permessage-deflate extension with default
|
||||
// configuration. If $SERVER_WEBSOCKET_COMPRESSION is set, then it must be valid
|
||||
// JSON. If it represents a falsey value, then we do not use permessage-deflate
|
||||
@@ -154,7 +152,7 @@ Object.assign(StreamServer.prototype, {
|
||||
// (meaning prior to any connect middlewares) so we need to take
|
||||
// an approach similar to overshadowListeners in
|
||||
// https://github.com/sockjs/sockjs-node/blob/cf820c55af6a9953e16558555a31decea554f70e/src/utils.coffee
|
||||
['request', 'upgrade'].forEach(function(event) {
|
||||
['request', 'upgrade'].forEach((event) => {
|
||||
var httpServer = WebApp.httpServer;
|
||||
var oldHttpServerListeners = httpServer.listeners(event).slice(0);
|
||||
httpServer.removeAllListeners(event);
|
||||
@@ -165,6 +163,9 @@ Object.assign(StreamServer.prototype, {
|
||||
// Store arguments for use within the closure below
|
||||
var args = arguments;
|
||||
|
||||
// TODO replace with url package
|
||||
var url = Npm.require('url');
|
||||
|
||||
// Rewrite /websocket and /websocket/ urls to /sockjs/websocket while
|
||||
// preserving query string.
|
||||
var parsedUrl = url.parse(request.url);
|
||||
|
||||
@@ -81,7 +81,7 @@ Meteor.methods({
|
||||
'tinytest/clearResults'(runId) {
|
||||
check(runId, String);
|
||||
|
||||
handlesForRun.get(runId).forEach(handle => {
|
||||
handlesForRun.get(runId)?.forEach(handle => {
|
||||
// XXX this doesn't actually notify the client that it has been
|
||||
// unsubscribed.
|
||||
handle.stop();
|
||||
|
||||
Reference in New Issue
Block a user