editor: links - proper linking to document attachments
[fnpeditor.git] / src / editor / modules / documentCanvas / documentCanvas.js
index 03b0cf7..2cb3fa1 100644 (file)
@@ -14,9 +14,9 @@ var logger = logging.getLogger('documentCanvas');
 
 return function(sandbox) {
 
-    var canvasElements;
+    var canvasElements = [];
 
-    sandbox.getPlugins(function(plugin) {
+    sandbox.getPlugins().forEach(function(plugin) {
         canvasElements = canvasElements.concat(plugin.canvasElements || []);
     });