Skip to content

Can't use Intl.NumberFormat without Debug JS Remotely turned on #15382

@vendramini

Description

@vendramini

Is this a bug report?

I think so.

Have you read the Contributing Guidelines?

Yes.

Environment

  1. react-native -v: 0.46.4, cli: 2.0.1
  2. node -v: 8.2.1
  3. npm -v: 5.3.0

Then, specify:

  • Target Platform: Both, but I just tested on Android for now.
  • Development Operating System: Linux Mint 17
  • Build tools: I use JetBrains PHPStorm to code. Build with default react-native run-*

Steps to Reproduce

(Write your steps here:)

  1. Try to use a simple code:
export const formatReal = (value) => {
    const formatter = new Intl.NumberFormat('pt-BR', {
        style: 'currency',
        currency: 'BRL',
        minimumFractionDigits: 2,
    });

    return formatter.format(value);
}
  1. Works if the debugger is conected.
  2. Turn off debugger from device.
  3. Explodes an error: "Can't find variable: Intl".

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions