mirror of
				https://github.com/Jermolene/TiddlyWiki5
				synced 2025-11-04 01:23:01 +00:00 
			
		
		
		
	New error message text for recursive transclusion error
This commit is contained in:
		@@ -45,7 +45,7 @@ TranscludeWidget.prototype.execute = function() {
 | 
			
		||||
	// Check for recursion
 | 
			
		||||
	var recursionMarker = this.makeRecursionMarker();;
 | 
			
		||||
	if(this.parentWidget && this.parentWidget.hasVariable("transclusion",recursionMarker)) {
 | 
			
		||||
		this.makeChildWidgets([{type: "text", text: "Tiddler recursion error in transclude widget"}]);
 | 
			
		||||
		this.makeChildWidgets([{type: "text", text: "Recursive transclusion error in transclude widget"}]);
 | 
			
		||||
		return;
 | 
			
		||||
	}
 | 
			
		||||
	// Set context variables for recursion detection
 | 
			
		||||
 
 | 
			
		||||
@@ -163,7 +163,7 @@ describe("Widget module", function() {
 | 
			
		||||
		var wrapper = renderWidgetNode(widgetNode);
 | 
			
		||||
		describe("should detect the recursion", function() {
 | 
			
		||||
			// Test the rendering
 | 
			
		||||
			expect(wrapper.innerHTML).toBe("Tiddler recursion error in transclude widget\n");
 | 
			
		||||
			expect(wrapper.innerHTML).toBe("Recursive transclusion error in transclude widget\n");
 | 
			
		||||
		});
 | 
			
		||||
 | 
			
		||||
	});
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user