Commit acddfb66 authored by Juan Corona's avatar Juan Corona

Fix the scoping of the initial value for the `plugins` property

This fixes the remaining failing tests.
When compiled from coffeescript the initial `{}` value was at the prototype level instead of scoped at the function level.
It looked like I was declaring it as an instance variable, but it was more like a class variable.. coffeescript is weird to me..
parent 77271a90
......@@ -48,6 +48,7 @@ module.exports = class Guest extends Delegator
anchoring: require('./anchoring/html')
# Internal state
plugins: null
anchors: null
visibleHighlights: false
......@@ -55,8 +56,6 @@ module.exports = class Guest extends Delegator
adder: '<hypothesis-adder></hypothesis-adder>'
wrapper: '<div class="annotator-wrapper"></div>'
plugins: {}
addPlugin: (name, options) ->
if @plugins[name]
console.error("You cannot have more than one instance of any plugin.")
......@@ -92,6 +91,7 @@ module.exports = class Guest extends Delegator
else
self._onClearSelection()
this.plugins = {}
this.anchors = []
cfOptions =
......
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