Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug: roundNumber function is undefined probably due to wrong import path #31

Closed
nikitonskii opened this issue Sep 30, 2022 · 2 comments
Closed

Comments

@nikitonskii
Copy link

nikitonskii commented Sep 30, 2022

Description

Hey!
I`m trying to use i18n.numberToCurrency method and format some numbers to current local string but get error that roundNumber is undefined.
Having changed a path to the ./roundNumber I got rid of this error

import { roundNumber } from ".";

look here please
i18n - v4.1.1
React-native v0.69.4

  • Gem version: >= 1.11.2
  • Ruby version: 2.7.5
@JohanDufau
Copy link

Yes, this import creates a cyclical dependency:
formatNumber.ts -> index.ts -> formatNumber.ts

The import should be direct at this level to ./roundNumber
(same for all siblings files)

Best!

@fnando
Copy link
Owner

fnando commented Nov 25, 2022

Fixed by #35

@fnando fnando closed this as completed Nov 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants