<commit_before>"use strict";

Router.map(function() {
	this.route('venueDetails', {
		path: 'venue/:_id/:name?',
		waitOn: function () {
			return [
				Meteor.subscribe('venueDetails', this.params._id),
				Meteor.subscribe('eventsFind', { location : this.params._id })
			];
		},

		data: function() {
			var id = this.params._id;

			var venue;
			var data = {};
			if (id === 'create') {
				var userId = Meteor.userId();
				venue = new Venue();
				venue.region = cleanedRegion(Session.get('region'));
				venue.editor = userId;
			} else {
				venue = Venues.findOne({_id: this.params._id});
				if (!venue) return false; // Not found

				data.eventsList = eventsFind({venue: id, after: minuteTime.get()}, 12);
			}

			data.venue = venue;

			return data;
		},

		onAfterAction: function() {
			var data = this.data();<commit_msg>fix venue event subscription<commit_after>"use strict";

Router.map(function() {
	this.route('venueDetails', {
		path: 'venue/:_id/:name?',
		waitOn: function () {
			return [
				Meteor.subscribe('venueDetails', this.params._id),
				Meteor.subscribe('eventsFind', { venue: this.params._id })
			];
		},

		data: function() {
			var id = this.params._id;

			var venue;
			var data = {};
			if (id === 'create') {
				var userId = Meteor.userId();
				venue = new Venue();
				venue.region = cleanedRegion(Session.get('region'));
				venue.editor = userId;
			} else {
				venue = Venues.findOne({_id: this.params._id});
				if (!venue) return false; // Not found

				data.eventsList = eventsFind({venue: id, after: minuteTime.get()}, 12);
			}

			data.venue = venue;

			return data;
		},

		onAfterAction: function() {
			var data = this.data();
{'fraction_non_alphanumeric': 0.1728833629366489, 'fraction_numerical': 0.002368265245707519, 'mean_word_length': 3.1119221411192215, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3621152', 'n_tokens_mistral': 682, 'n_tokens_neox': 557, 'n_words': 124}