Commit e73be4cc authored by Randall Leeds's avatar Randall Leeds

fix last thread->references changes

parent 53cd7c1b
......@@ -244,7 +244,7 @@ class Annotation
[$scope.thread.message.id]
reply = angular.extend annotator.createAnnotation(),
thread: references.join '/'
references: references
annotator.setupAnnotation reply
......
......@@ -27,14 +27,16 @@ class Annotator.Plugin.Threading extends Annotator.Plugin
thread.message = annotation
# Attach the thread to its parent, if any.
references = annotation.thread?.split('/')
if references?.length
annotation.references = references
prev = references[references.length-1]
if annotation.references?.length
prev = annotation.references[annotation.references.length-1]
@annotator.threading.getContainer(prev).addChild thread
# Expose the thread to the annotation
annotation.thread = thread
Object.defineProperty annotation, 'thread',
configurable: true
enumerable: false
writable: true
value: thread
# Update the id table
@annotator.threading.idTable[annotation.id] = thread
......
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