mirror of
				https://github.com/go-gitea/gitea.git
				synced 2025-10-31 21:28:11 +09:00 
			
		
		
		
	Fix JS error when editing a merged PR's title (#30990)
This commit is contained in:
		| @@ -626,9 +626,12 @@ export function initRepoIssueTitleEdit() { | ||||
|     showElem(issueTitleDisplay); | ||||
|     showElem('#pull-desc-display'); | ||||
|   }); | ||||
|  | ||||
|   const pullDescEditor = document.querySelector('#pull-desc-editor'); // it may not exist for a merged PR | ||||
|   const prTargetUpdateUrl = pullDescEditor?.getAttribute('data-target-update-url'); | ||||
|  | ||||
|   const editSaveButton = issueTitleEditor.querySelector('.ui.primary.button'); | ||||
|   editSaveButton.addEventListener('click', async () => { | ||||
|     const prTargetUpdateUrl = editSaveButton.getAttribute('data-target-update-url'); | ||||
|     const newTitle = issueTitleInput.value.trim(); | ||||
|     try { | ||||
|       if (newTitle && newTitle !== oldTitle) { | ||||
|   | ||||
		Reference in New Issue
	
	Block a user