-
-
Notifications
You must be signed in to change notification settings - Fork 381
Closed
Labels
Status: In ProgressWork in ProgressWork in ProgressStatus: PR WelcomeWelcome to Pull RequestWelcome to Pull RequestType: FeatureIncludes new featuresIncludes new features🍰 p2-nice-to-havePriority 2: nothing is broken but it's worth addressingPriority 2: nothing is broken but it's worth addressing
Description
Reporting a bug?
Using part option for number formatter throws an error. JSfiddle below.
Example usage:
const i18n = createI18n({
locale: 'en',
legacy: false,
numberFormats: {
en: {
currency: {
style: 'currency',
currencyDisplay: 'narrowSymbol',
},
}
})
const { n } = useI18n()
const parts = n(100, { key: 'currency', part: true, currency: 'USD' })
Expected behavior
- not to throw error
- return an array of parts, so have the same return signature as Intl.NumberFormatter.prototype.formatToParts
Reproduction
https://jsfiddle.net/qagtkzxj/39/
System Info
System:
OS: macOS 12.5.1
CPU: (8) arm64 Apple M1
Memory: 80.39 MB / 8.00 GB
Shell: 5.8.1 - /bin/zsh
Binaries:
Node: 16.16.0 - ~/.nvm/versions/node/v16.16.0/bin/node
Yarn: 1.22.18 - /opt/homebrew/bin/yarn
npm: 8.11.0 - ~/.nvm/versions/node/v16.16.0/bin/npm
Browsers:
Chrome: 104.0.5112.101
Firefox: 94.0.2
Firefox Developer Edition: 105.0
Safari: 15.6.1
npmPackages:
vue: ^3.2.36 => 3.2.37
vue-chartjs: ^4.1.1 => 4.1.1
vue-i18n: ^9.2.2 => 9.2.2
vue-router: ^4.1.5 => 4.1.5Screenshot
No response
Additional context
No response
Validations
- Read the Contributing Guidelines
- Read the Documentation
- Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
- Check that this is a concrete bug. For Q&A open a GitHub Discussion
- The provided reproduction is a minimal reproducible example of the bug.
aflatscher-loop
Metadata
Metadata
Assignees
Labels
Status: In ProgressWork in ProgressWork in ProgressStatus: PR WelcomeWelcome to Pull RequestWelcome to Pull RequestType: FeatureIncludes new featuresIncludes new features🍰 p2-nice-to-havePriority 2: nothing is broken but it's worth addressingPriority 2: nothing is broken but it's worth addressing