[Bug]: `shouldStringifyDatesInCalls` should apply to both directions

Ouverte
#7,253 0 commentaires 0 réactions 1 personne assignée Voir sur GitHub

Les mainteneurs répondent en général sous 1 jour

@theproducer y travaille déjà.

Depuis le 15/2/2024.

Évaluation

Cette issue n'a pas encore été évaluée.

Description

bug platform: android platform: ios
Capacitor Version

💊 Capacitor Doctor 💊

Latest Dependencies:

@capacitor/cli: 5.7.0
@capacitor/core: 5.7.0
@capacitor/android: 5.7.0
@capacitor/ios: 5.7.0

Installed Dependencies:

@capacitor/cli: 5.4.2
@capacitor/android: 5.4.2
@capacitor/core: 5.4.2
@capacitor/ios: 5.4.2

[success] iOS looking great! 👌
[success] Android looking great! 👌

Other API Details

No response

Platforms Affected
  • iOS
  • Android
  • Web
Current Behavior

The Capacitor Firebase Firestore plugin must be able to distinguish between strings and date objects both incoming and outgoing.
I use shouldStringifyDatesInCalls to prevent JS date objects from being converted to strings. Unfortunately, this only works incoming, not outgoing.

Expected Behavior

If I return a Date object on Android (see https://github.com/ionic-team/capacitor/issues/7252) or iOS and the shouldStringifyDatesInCalls is set to false, then I expect a JS date object at JS level.

Project Reproduction

https://github.com/robingenz/capacitor-firebase-plugin-demo

Additional Information

See https://github.com/robingenz/capacitor-firebase-plugin-demo/blob/676a3ea77190011b1951f7e9e983156467cf9a77/src/app/modules/firebase-firestore/firebase-firestore.page.ts

Langage dominant
TypeScript
Étoiles
17.1k
Forks
1.3k
Merge moyen
1 j 22 h
PR mergées (30 j)
26

Préparer son environnement

Par où commencer

  1. Lisez l'issue en entier, puis le guide de contribution du projet.
  2. Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
  3. Forkez le dépôt et travaillez sur une branche.
  4. Ouvrez une pull request qui référence le numéro de l'issue.

Autres issues de ionic-team/capacitor

Toutes les issues de ionic-team/capacitor

Issues similaires

Plus d'issues TypeScript

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.