فهرست منبع

Prevent autocompile loop

If an autocompile hits a rate limit, it would get into a bad state where
it would continuely loop making compile requests. This is because the
compile response resolving would disable auto compile (because the rate
limit was hit) but also trigger calculation of uncompiled changes, which
would not check if autocompile was disabled. The fix is to just check if
autocompile is disabled.
Alasdair Smith 8 سال پیش
والد
کامیت
9dd965da3c
1فایلهای تغییر یافته به همراه3 افزوده شده و 0 حذف شده
  1. 3 0
      services/web/public/coffee/ide/pdf/controllers/PdfController.coffee

+ 3 - 0
services/web/public/coffee/ide/pdf/controllers/PdfController.coffee

@@ -125,6 +125,9 @@ define [
 
 		$scope.uncompiledChanges = false
 		recalculateUncompiledChanges = () ->
+			if !$scope.autocompile_enabled
+				# Auto-compile was disabled
+				$scope.uncompiledChanges = false
 			if $scope.ui.pdfHidden
 				# Don't bother auto-compiling if pdf isn't visible
 				$scope.uncompiledChanges = false