mirror of
				https://github.com/flynx/pWiki.git
				synced 2025-10-30 18:40:08 +00:00 
			
		
		
		
	minor fixes...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
		
							parent
							
								
									807a6df56d
								
							
						
					
					
						commit
						473fe85d0f
					
				| @ -356,7 +356,7 @@ object.Constructor('BasePage', { | |||||||
| 	// number of matching pages...
 | 	// number of matching pages...
 | ||||||
| 	// NOTE: this can be both sync and async...
 | 	// NOTE: this can be both sync and async...
 | ||||||
| 	get length(){ | 	get length(){ | ||||||
| 		var p = this.resolve(this.path) | 		var p = this.resolve(this.location) | ||||||
| 		return p instanceof Array ? | 		return p instanceof Array ? | ||||||
| 				p.length | 				p.length | ||||||
| 			: p instanceof Promise ? | 			: p instanceof Promise ? | ||||||
| @ -515,11 +515,12 @@ object.Constructor('BasePage', { | |||||||
| 	// XXX when this is async, should this return a promise????
 | 	// XXX when this is async, should this return a promise????
 | ||||||
| 	sort: async function(cmp){ | 	sort: async function(cmp){ | ||||||
| 		// not sorting single pages...
 | 		// not sorting single pages...
 | ||||||
| 		if(this.length <= 1){ | 		//if(this.length <= 1){
 | ||||||
|  | 		if(!this.isPattern){ | ||||||
| 			return this } | 			return this } | ||||||
| 		// sort...
 | 		// sort...
 | ||||||
| 		this.metadata =  | 		this.metadata =  | ||||||
| 			{ order: await this.each() | 			{ order: (await this.each()) | ||||||
| 				.sort(...arguments) | 				.sort(...arguments) | ||||||
| 				.map(function(p){ | 				.map(function(p){ | ||||||
| 					return p.path }) } | 					return p.path }) } | ||||||
| @ -1858,7 +1859,7 @@ module.System = { | |||||||
| 			</slot> | 			</slot> | ||||||
| 			<hr> | 			<hr> | ||||||
| 			<slot content> | 			<slot content> | ||||||
| 				<h1><slot title>@source(./title)</slot></h1> | 				<h1><slot title>@source(./title/!)</slot></h1> | ||||||
| 				@include(.:$ARGS join="@source(file-separator)" recursive="") | 				@include(.:$ARGS join="@source(file-separator)" recursive="") | ||||||
| 			</slot> | 			</slot> | ||||||
| 			<hr> | 			<hr> | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user