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.
This commit is contained in:
Alasdair Smith 2018-10-10 15:04:18 +01:00
parent 250edf4670
commit 9dd965da3c

View file

@ -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