mirror of
				https://github.com/Jermolene/TiddlyWiki5
				synced 2025-10-26 05:07:39 +00:00 
			
		
		
		
	Fix cycle operator crashing if step size is larger than the number of operands
See https://talk.tiddlywiki.org/t/bug-report-javascript-error-at-tw-com-within-cycle-operator-try-it/9430/1
This commit is contained in:
		| @@ -202,7 +202,7 @@ Extended filter operators to manipulate the current list. | |||||||
| 		} | 		} | ||||||
| 		if(resultsIndex !== -1) { | 		if(resultsIndex !== -1) { | ||||||
| 			i = i + step; | 			i = i + step; | ||||||
| 			nextOperandIndex = (i < opLength ? i : i - opLength); | 			nextOperandIndex = (i < opLength ? i : i % opLength); | ||||||
| 			if(operands.length > 1) { | 			if(operands.length > 1) { | ||||||
| 				results.splice(resultsIndex,1,operands[nextOperandIndex]); | 				results.splice(resultsIndex,1,operands[nextOperandIndex]); | ||||||
| 			} else { | 			} else { | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 Jeremy Ruston
					Jeremy Ruston