Commit 584ff6a9 authored by csillag's avatar csillag

Fix a bug introduced with visual diff support

When creating a reply, there was an exception
on the console, because the target list is empty,
and some code was not prepared for that.

This takes care of that.
parent 41875e6f
......@@ -134,6 +134,7 @@ AnnotationController = [
# shouldShowDiff is set to true if there are some meaningful differences
# - that is, more than just uppercase / lowercase
diffFromTargets = (targets) ->
return {hasDiff: false, shouldShowDiff: false} unless targets?
hasDiff = targets.some (t) ->
t.diffHTML?
shouldShowDiff = hasDiff and targets.some (t) ->
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment