StricterDOM: Check config before enabling (#4250)
This commit is contained in:
parent
1a7fedcb73
commit
9ee90020dc
@ -7,7 +7,7 @@ import { getActions, withGlobal } from '../../global';
|
|||||||
import type { GlobalState } from '../../global/types';
|
import type { GlobalState } from '../../global/types';
|
||||||
import type { LangCode } from '../../types';
|
import type { LangCode } from '../../types';
|
||||||
|
|
||||||
import { DEFAULT_LANG_CODE } from '../../config';
|
import { DEFAULT_LANG_CODE, STRICTERDOM_ENABLED } from '../../config';
|
||||||
import { disableStrict, enableStrict } from '../../lib/fasterdom/stricterdom';
|
import { disableStrict, enableStrict } from '../../lib/fasterdom/stricterdom';
|
||||||
import buildClassName from '../../util/buildClassName';
|
import buildClassName from '../../util/buildClassName';
|
||||||
import { setLanguage } from '../../util/langProvider';
|
import { setLanguage } from '../../util/langProvider';
|
||||||
@ -106,7 +106,9 @@ const AuthCode: FC<StateProps> = ({
|
|||||||
const container = qrCodeRef.current!;
|
const container = qrCodeRef.current!;
|
||||||
const data = `${DATA_PREFIX}${authQrCode.token}`;
|
const data = `${DATA_PREFIX}${authQrCode.token}`;
|
||||||
|
|
||||||
disableStrict();
|
if (STRICTERDOM_ENABLED) {
|
||||||
|
disableStrict();
|
||||||
|
}
|
||||||
|
|
||||||
qrCode.update({
|
qrCode.update({
|
||||||
data,
|
data,
|
||||||
@ -117,9 +119,11 @@ const AuthCode: FC<StateProps> = ({
|
|||||||
markQrMounted();
|
markQrMounted();
|
||||||
}
|
}
|
||||||
|
|
||||||
setTimeout(() => {
|
if (STRICTERDOM_ENABLED) {
|
||||||
enableStrict();
|
setTimeout(() => {
|
||||||
}, QR_CODE_MUTATION_DURATION);
|
enableStrict();
|
||||||
|
}, QR_CODE_MUTATION_DURATION);
|
||||||
|
}
|
||||||
|
|
||||||
return undefined;
|
return undefined;
|
||||||
}, [isConnected, authQrCode, isQrMounted, markQrMounted, unmarkQrMounted, qrCode]);
|
}, [isConnected, authQrCode, isQrMounted, markQrMounted, unmarkQrMounted, qrCode]);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user