mirror of
				https://github.com/Jermolene/TiddlyWiki5
				synced 2025-10-24 20:27:38 +00:00 
			
		
		
		
	Fix str.length strEndsWith bug (#2572)
This was some how missed in dev testing I guess. @buggyj suggested this. Should fix #2571
This commit is contained in:
		 Devin Weaver
					Devin Weaver
				
			
				
					committed by
					
						 Jeremy Ruston
						Jeremy Ruston
					
				
			
			
				
	
			
			
			 Jeremy Ruston
						Jeremy Ruston
					
				
			
						parent
						
							b9299309cc
						
					
				
				
					commit
					f1090d749e
				
			| @@ -718,7 +718,7 @@ exports.strEndsWith = function(str,ending,position) { | ||||
| 		if (typeof position !== 'number' || !isFinite(position) || Math.floor(position) !== position || position > str.length) { | ||||
| 			position = str.length; | ||||
| 		} | ||||
| 		position -= str.length; | ||||
| 		position -= ending.length; | ||||
| 		var lastIndex = str.indexOf(ending, position); | ||||
| 		return lastIndex !== -1 && lastIndex === position; | ||||
| 	} | ||||
|   | ||||
		Reference in New Issue
	
	Block a user