Преглед изворни кода

avoid exception on pdfPage destroy

Brian Gough пре 12 година
родитељ
комит
7ea20c4266
1 измењених фајлова са 1 додато и 1 уклоњено
  1. 1 1
      services/web/public/coffee/ide/pdfng/directives/pdfPage.coffee

+ 1 - 1
services/web/public/coffee/ide/pdfng/directives/pdfPage.coffee

@@ -108,7 +108,7 @@ define [
 					, 1000
 					, 1000
 
 
 				scope.$on "$destroy", () ->
 				scope.$on "$destroy", () ->
-					if scope.timeoutHandler
+					if scope.timeoutHandler?
 						$timeout.cancel(scope.timeoutHandler)
 						$timeout.cancel(scope.timeoutHandler)
 						highlightsLayer.clearHighlights()
 						highlightsLayer.clearHighlights()