Commit 939996e4 authored by Randall Leeds's avatar Randall Leeds

emptyThread.isNew() -> false

parent b03705f7
......@@ -61,6 +61,14 @@ describe 'thread', ->
assert(not controller.isNew())
it 'returns false from isNew() for a null annotation', ->
createDirective()
# The ThreadController may be an empty container.
controller.container = {}
assert(not controller.isNew())
describe '#toggleCollapsed', ->
count = null
......
......@@ -147,7 +147,7 @@ ThreadController = [
# false otherwise.
###
this.isNew = ->
return (this.id and not this.container?.message?.id)
return (this.container?.message? and not this.container?.message?.id)
this._isFilterActive = ->
if @filter
......
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