mirror of
				https://github.com/Jermolene/TiddlyWiki5
				synced 2025-10-30 23:23:02 +00:00 
			
		
		
		
	Merge pull request #1131 from Skeeve/patch-7
allow empty state tiddlers and missing state attributes act as missing s...
This commit is contained in:
		| @@ -106,20 +106,18 @@ Read the state tiddler | ||||
| */ | ||||
| RevealWidget.prototype.readState = function() { | ||||
| 	// Read the information from the state tiddler | ||||
| 	if(this.stateTitle) { | ||||
| 		var state = this.wiki.getTextReference(this.stateTitle,this["default"],this.getVariable("currentTiddler")); | ||||
| 		switch(this.type) { | ||||
| 			case "popup": | ||||
| 				this.readPopupState(state); | ||||
| 				break; | ||||
| 			case "match": | ||||
| 				this.readMatchState(state); | ||||
| 				break; | ||||
| 			case "nomatch": | ||||
| 				this.readMatchState(state); | ||||
| 				this.isOpen = !this.isOpen; | ||||
| 				break; | ||||
| 		} | ||||
| 	var state = this.stateTitle ? this.wiki.getTextReference(this.stateTitle,this["default"],this.getVariable("currentTiddler")) : this["default"]; | ||||
| 	switch(this.type) { | ||||
| 		case "popup": | ||||
| 			this.readPopupState(state); | ||||
| 			break; | ||||
| 		case "match": | ||||
| 			this.readMatchState(state); | ||||
| 			break; | ||||
| 		case "nomatch": | ||||
| 			this.readMatchState(state); | ||||
| 			this.isOpen = !this.isOpen; | ||||
| 			break; | ||||
| 	} | ||||
| }; | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Jeremy Ruston
					Jeremy Ruston