diff options
| author | 2023-10-24 10:28:59 +0200 | |
|---|---|---|
| committer | 2023-10-24 14:34:43 +0200 | |
| commit | 8a23ce2b3ef506cd9f254c40b1c7fd51ba472ce9 (patch) | |
| tree | c2ba547698d92f53705600851673ccb4f676bab8 /web/source/settings/lib/form/submit.ts | |
| parent | [bugfix/frontend] fix typo and other oddness in patchRemoteEmojis (#2281) (diff) | |
| download | gotosocial-8a23ce2b3ef506cd9f254c40b1c7fd51ba472ce9.tar.xz | |
[bugfix/frontend] Add `nosubmit` option to form fields + use it when instance custom CSS disabled (#2290)
Diffstat (limited to 'web/source/settings/lib/form/submit.ts')
| -rw-r--r-- | web/source/settings/lib/form/submit.ts | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/web/source/settings/lib/form/submit.ts b/web/source/settings/lib/form/submit.ts index d5636a587..aa662086f 100644 --- a/web/source/settings/lib/form/submit.ts +++ b/web/source/settings/lib/form/submit.ts @@ -87,10 +87,10 @@ export default function useFormSubmit( if (e.nativeEvent.submitter) { // We want the name of the element that was invoked to submit this form, // which will be something that extends HTMLElement, though we don't know - // what at this point. + // what at this point. If it's an empty string, fall back to undefined. // // See: https://developer.mozilla.org/en-US/docs/Web/API/SubmitEvent/submitter - action = (e.nativeEvent.submitter as Object as { name: string }).name; + action = (e.nativeEvent.submitter as Object as { name: string }).name || undefined; } else { // No submitter defined. Fall back // to just use the FormSubmitEvent. |
