ajv-validator / ajv-validator/ajv

ajv.compile not working in react native but working in react web after v7.0.0 release.

Aperta
#1,945 14 commenti 8 reazioni 0 assegnatari Vedi su GitHub
compatibility
Lingua principale
TypeScript
Stelle
14.8k
Fork
1k
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

ajv.compile doesn't works on mobile (On web it is working fine) and crashes the app, looks like it goes in infinite recursion. It was working fine before version 7.0.0

**react: 17.0.2**
**react-native: 0.67.2**
**ajv: 8.11.0**

```
import Ajv from 'ajv';
const ajv = new Ajv();

const IPasswordRecoveryTokenSchema = {
type: 'object',
properties: {
token: { type: 'string' },
expiresAtMs: { type: 'number' },
},
required: ['token', 'expiresAtMs'],
additionalProperties: false,
};

export const IPasswordRecoveryTokenValidator = ajv.compile(IPasswordRecoveryTokenSchema);

```
**RangeError: Maximum call stack size exceeded (native stack depth), js engine: hermes**

Guida per i contributori

Apri la guida per i contributori

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.