Commit 93590fd6 authored by gergely-ujvari's avatar gergely-ujvari

Merge pull request #1506 from hypothesis/1502-missing-uri-property

Sync the bridge after beforeAnnotationCreated
parents 90d6d705 30bd605d
......@@ -188,7 +188,7 @@ AnnotationController = [
angular.extend @annotation, angular.copy model
# Extract the document metadata.
if model.document and model.target.length
if model.document
domain = extractURIComponent(model.uri, 'hostname')
@document =
......
......@@ -226,6 +226,11 @@ class Annotator.Guest extends Annotator
this.removeEvents()
createAnnotation: ->
annotation = super
this.plugins.Bridge.sync([annotation])
annotation
showViewer: (annotations) =>
@panel?.notify
method: "showViewer"
......
......@@ -65,12 +65,6 @@ describe 'h.directives.annotation', ->
$scope.$digest()
assert.isNull(controller.document)
it 'skips the document object if the annotation has no targets', ->
annotation.target = []
controller = createController()
$scope.$digest()
assert.isNull(controller.document)
describe '#reply', ->
controller = null
container = null
......
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