]> source.dussan.org Git - gitea.git/commit
Prevent NPE if trying to restore an already restored deleted branch (#21940) (#21944)
authorzeripath <art27@cantab.net>
Fri, 25 Nov 2022 23:28:03 +0000 (23:28 +0000)
committerGitHub <noreply@github.com>
Fri, 25 Nov 2022 23:28:03 +0000 (17:28 -0600)
commitb56d269cf8a36582863f2629f80685087afb5a41
tree8788aa81f84ed845e6993172ef734e508c5a20f9
parentff4e292b3fe49ee3086f45de1717301981e5f5f2
Prevent NPE if trying to restore an already restored deleted branch (#21940) (#21944)

Backport #21940

If a deleted-branch has already been restored, a request to restore it
again will cause a NPE. This PR adds detection for this case, but also
disables buttons when they're clicked in order to help prevent
accidental repeat requests.

Fix #21930

Signed-off-by: Andrew Thornton <art27@cantab.net>
routers/web/repo/branch.go
web_src/js/features/common-global.js