Skip to content

Commit

Permalink
fix(nf): fixes nfvalueconverter with null||undefined options
Browse files Browse the repository at this point in the history
this converts null and undefined options provided to the nfvalueconverter to
an empty object

fixes issue #14
  • Loading branch information
zewa666 committed Sep 21, 2015
1 parent d9a8f17 commit ff9ce63
Show file tree
Hide file tree
Showing 7 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "aurelia-i18n",
"version": "0.2.0",
"version": "0.2.1",
"description": "A plugin that provides i18n support.",
"keywords": [
"aurelia",
Expand Down
2 changes: 1 addition & 1 deletion dist/amd/i18n.js
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ define(['exports', 'i18next', './utils'], function (exports, _i18next, _utils) {
}, {
key: 'nf',
value: function nf(options, locales) {
return new this.Intl.NumberFormat(locales || this.getLocale(), options);
return new this.Intl.NumberFormat(locales || this.getLocale(), options || {});
}
}, {
key: 'df',
Expand Down
2 changes: 1 addition & 1 deletion dist/commonjs/i18n.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ var I18N = (function () {
}, {
key: 'nf',
value: function nf(options, locales) {
return new this.Intl.NumberFormat(locales || this.getLocale(), options);
return new this.Intl.NumberFormat(locales || this.getLocale(), options || {});
}
}, {
key: 'df',
Expand Down
2 changes: 1 addition & 1 deletion dist/es6/i18n.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ export class I18N {
}

nf(options, locales) {
return new this.Intl.NumberFormat(locales || this.getLocale(), options);
return new this.Intl.NumberFormat(locales || this.getLocale(), options || {});
}

df(options, locales) {
Expand Down
2 changes: 1 addition & 1 deletion dist/system/i18n.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ System.register(['i18next', './utils'], function (_export) {
}, {
key: 'nf',
value: function nf(options, locales) {
return new this.Intl.NumberFormat(locales || this.getLocale(), options);
return new this.Intl.NumberFormat(locales || this.getLocale(), options || {});
}
}, {
key: 'df',
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "aurelia-i18n",
"version": "0.2.0",
"version": "0.2.1",
"description": "A plugin that provides i18n support.",
"keywords": [
"aurelia",
Expand Down
2 changes: 1 addition & 1 deletion src/i18n.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ export class I18N {
}

nf(options, locales) {
return new this.Intl.NumberFormat(locales || this.getLocale(), options);
return new this.Intl.NumberFormat(locales || this.getLocale(), options || {});
}

df(options, locales) {
Expand Down

0 comments on commit ff9ce63

Please sign in to comment.