From 3768783ceb7921b2612ce45b8ad22497b1b1fd05 Mon Sep 17 00:00:00 2001 From: Nick Winter Date: Fri, 4 Sep 2015 18:11:19 -0700 Subject: [PATCH] Don't be making LadderSubmissionViews in the CastButtonView unless it's a mirror match. --- app/views/play/level/tome/CastButtonView.coffee | 1 + 1 file changed, 1 insertion(+) diff --git a/app/views/play/level/tome/CastButtonView.coffee b/app/views/play/level/tome/CastButtonView.coffee index 59343ff0e..c0cdb423b 100644 --- a/app/views/play/level/tome/CastButtonView.coffee +++ b/app/views/play/level/tome/CastButtonView.coffee @@ -164,6 +164,7 @@ module.exports = class CastButtonView extends CocoView updateLadderSubmissionViews: -> @removeSubView subview for key, subview of @subviews when subview instanceof LadderSubmissionView placeholder = @$el.find('.ladder-submission-view') + return unless placeholder.length @ladderSubmissionView = new LadderSubmissionView session: @options.session, level: @options.level, mirrorSession: @mirrorSession @insertSubView @ladderSubmissionView, placeholder