6個ピン留めできてしまうの修正 (#2804)
This commit is contained in:
		
							parent
							
								
									9a57efa6d9
								
							
						
					
					
						commit
						e813880392
					
				
					 1 changed files with 1 additions and 1 deletions
				
			
		| 
						 | 
					@ -26,7 +26,7 @@ export async function addPinned(user: IUser, noteId: mongo.ObjectID) {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	const pinnedNoteIds = user.pinnedNoteIds || [];
 | 
						const pinnedNoteIds = user.pinnedNoteIds || [];
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if (pinnedNoteIds.length > 5) {
 | 
						if (pinnedNoteIds.length >= 5) {
 | 
				
			||||||
		throw new Error('cannot pin more notes');
 | 
							throw new Error('cannot pin more notes');
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue