Просмотр исходного кода

fix infinite loop in translated coffeescript for pdfng text layer

Brian Gough 12 лет назад
Родитель
Сommit
4888ae8766
1 измененных файлов с 3 добавлено и 2 удалено
  1. 3 2
      services/web/public/coffee/ide/pdfng/directives/pdfTextLayer.coffee

+ 3 - 2
services/web/public/coffee/ide/pdfng/directives/pdfTextLayer.coffee

@@ -125,10 +125,11 @@ define [
 				lastFontSize = undefined
 				lastFontSize = undefined
 				lastFontFamily = undefined
 				lastFontFamily = undefined
 				i = 0
 				i = 0
-
 				while i < textDivsLength
 				while i < textDivsLength
 					textDiv = textDivs[i]
 					textDiv = textDivs[i]
-					continue if textDiv.dataset.isWhitespace
+					if textDiv.dataset.isWhitespace
+						i++
+						continue
 					fontSize = textDiv.style.fontSize
 					fontSize = textDiv.style.fontSize
 					fontFamily = textDiv.style.fontFamily
 					fontFamily = textDiv.style.fontFamily