👕Fix courses view linter warning

warn: Linting of app/views/courses/mock1/CoursesView.coffee: warn:
ensure_comprehensions at line 72.

May be a linter bug, have filed an issue here:
https://github.com/clutchski/coffeelint/issues/482
This commit is contained in:
Matt Lott 2015-08-07 12:03:06 -07:00
parent 7c92d7cd1c
commit ab9e3d39ee

View file

@ -69,7 +69,8 @@ module.exports = class CoursesView extends RootView
$('#continueModal').modal('hide')
courseID = $(e.target).data('course-id')
instanceName = $('.select-session').val()
instanceID = index for val, index in @instances when val.name is instanceName
for val, index in @instances when val.name is instanceName
instanceID = index
viewClass = require 'views/courses/mock1/CourseDetailsView'
viewArgs = [{}, courseID, instanceID]
navigationEvent = route: "/courses/mock1/#{courseID}", viewClass: viewClass, viewArgs: viewArgs