fix(frontend/MkSignup): prevent uncaught errors from interrupted signup (#10265)

* fix(frontend/MkSignup): prevent uncaught errors from interrupted signup

* nullable sitekey

---------

Co-authored-by: tamaina <tamaina@hotmail.co.jp>
This commit is contained in:
Kagami Sascha Rosylight 2023-03-11 06:32:13 +01:00 committed by GitHub
parent 4e7e377987
commit 1ea4469bec
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 29 additions and 28 deletions

View file

@ -10,7 +10,8 @@ import { ref, shallowRef, computed, onMounted, onBeforeUnmount, watch } from 'vu
import { defaultStore } from '@/store';
import { i18n } from '@/i18n';
type Captcha = {
// APIs provided by Captcha services
export type Captcha = {
render(container: string | Node, options: {
readonly [_ in 'sitekey' | 'theme' | 'type' | 'size' | 'tabindex' | 'callback' | 'expired' | 'expired-callback' | 'error-callback' | 'endpoint']?: unknown;
}): string;
@ -32,7 +33,7 @@ declare global {
const props = defineProps<{
provider: CaptchaProvider;
sitekey: string;
sitekey: string | null; // null will show error on request
modelValue?: string | null;
}>();