File tree Expand file tree Collapse file tree 3 files changed +18
-11
lines changed Expand file tree Collapse file tree 3 files changed +18
-11
lines changed Original file line number Diff line number Diff line change @@ -51,17 +51,19 @@ export const sendFeedback: SendFeedback = (
51
51
if (
52
52
response &&
53
53
typeof response . statusCode === 'number' &&
54
- ( response . statusCode < 200 || response . statusCode >= 300 )
54
+ response . statusCode >= 200 &&
55
+ response . statusCode < 300
55
56
) {
56
- if ( response . statusCode === 0 ) {
57
- return reject (
58
- 'Unable to send Feedback. This is because of network issues, or because you are using an ad-blocker.' ,
59
- ) ;
60
- }
61
- return reject ( 'Unable to send Feedback. Invalid response from server.' ) ;
57
+ resolve ( eventId ) ;
62
58
}
63
59
64
- resolve ( eventId ) ;
60
+ if ( response && typeof response . statusCode === 'number' && response . statusCode === 0 ) {
61
+ return reject (
62
+ 'Unable to send Feedback. This is because of network issues, or because you are using an ad-blocker.' ,
63
+ ) ;
64
+ }
65
+
66
+ return reject ( 'Unable to send Feedback. Invalid response from server.' ) ;
65
67
} ) ;
66
68
} ) ;
67
69
} ;
Original file line number Diff line number Diff line change @@ -100,7 +100,8 @@ const FORM = `
100
100
}
101
101
102
102
.form__right {
103
- min-width: var(--form-width, 272px);
103
+ flex: 0 0 var(--form-width, 272px);
104
+ width: var(--form-width, 272px);
104
105
display: flex;
105
106
overflow: auto;
106
107
flex-direction: column;
Original file line number Diff line number Diff line change @@ -130,7 +130,7 @@ export function Form({
130
130
onSubmitSuccess ( data ) ;
131
131
} catch ( error ) {
132
132
DEBUG_BUILD && logger . error ( error ) ;
133
- setError ( 'There was a problem submitting feedback, please wait and try again.' ) ;
133
+ setError ( error as string ) ;
134
134
onSubmitError ( error as Error ) ;
135
135
}
136
136
} catch {
@@ -230,7 +230,11 @@ function LabelText({
230
230
label,
231
231
isRequired,
232
232
isRequiredLabel,
233
- } : { label : string ; isRequired : boolean ; isRequiredLabel : string } ) : VNode {
233
+ } : {
234
+ label : string ;
235
+ isRequired : boolean ;
236
+ isRequiredLabel : string ;
237
+ } ) : VNode {
234
238
return (
235
239
< span class = "form__label__text" >
236
240
{ label }
You can’t perform that action at this time.
0 commit comments