From f59eb17cf33c4414bfd261bf04873ee6184ecad3 Mon Sep 17 00:00:00 2001 From: Joachim Bauch Date: Fri, 24 Apr 2015 13:52:53 +0200 Subject: [PATCH] Destroy sandbox API when scope is destroyed. --- static/js/directives/pdfcanvas.js | 1 + 1 file changed, 1 insertion(+) diff --git a/static/js/directives/pdfcanvas.js b/static/js/directives/pdfcanvas.js index e4a11bfc..b425b2a7 100644 --- a/static/js/directives/pdfcanvas.js +++ b/static/js/directives/pdfcanvas.js @@ -266,6 +266,7 @@ define(['require', 'underscore', 'jquery', 'text!partials/pdfcanvas_sandbox.html $scope.$on("$destroy", function() { pdfCanvas.close(); pdfCanvas = null; + sandboxApi.destroy(); }); $scope.$watch("currentPageNumber", function(page, oldValue) {