outposts/proxy: fix error checking for type assertion
Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org>
This commit is contained in:
parent
4a56b5e827
commit
f246da6b73
|
@ -15,7 +15,11 @@ func (a *Application) handleRedirect(rw http.ResponseWriter, r *http.Request) {
|
|||
if err != nil {
|
||||
s.Values[constants.SessionOAuthState] = []string{}
|
||||
}
|
||||
state := s.Values[constants.SessionOAuthState].([]string)
|
||||
state, ok := s.Values[constants.SessionOAuthState].([]string)
|
||||
if !ok {
|
||||
s.Values[constants.SessionOAuthState] = []string{}
|
||||
state = []string{}
|
||||
}
|
||||
s.Values[constants.SessionOAuthState] = append(state, newState)
|
||||
err = s.Save(r, rw)
|
||||
if err != nil {
|
||||
|
|
|
@ -88,7 +88,9 @@ export class DeleteForm extends ModalButton {
|
|||
return html``;
|
||||
}
|
||||
return html`
|
||||
<section class="pf-c-modal-box__body pf-c-page__main-section pf-m-light">
|
||||
<section
|
||||
class="pf-c-modal-box__body pf-c-page__main-section pf-m-light"
|
||||
>
|
||||
<form class="pf-c-form pf-m-horizontal">
|
||||
<p>${t`The following objects use ${objName} `}</p>
|
||||
<ul class="pf-c-list">
|
||||
|
|
Reference in a new issue