'use strict';

var Driver = global.WebSocket || global.MozWebSocket;
if (Driver) {
	module.exports = function WebSocketBrowserDriver(url) {
		return new Driver(url);
	};
}

'use strict';

var Driver = global.WebSocket || global.MozWebSocket;
if (Driver) {
	module.exports = function WebSocketBrowserDriver(url) {
		return new Driver(url);
	};
} else {
	module.exports = undefined;
}

FIX error with webpack when WebSocket not exists
FIX error with webpack when WebSocket not exists

When building with webpack and you didn't define module.exports it will default to an empty object {}
So when transport.enabled test !!WebSocketDriver it returns true instead of false.