Skip to content
Snippets Groups Projects
Unverified Commit 361c56bd authored by Bekerle, Patrizio's avatar Bekerle, Patrizio :fire:
Browse files

Add defaults for option parameters

parent 4b1a3763
No related branches found
No related tags found
No related merge requests found
Pipeline #14531 passed
......@@ -10,7 +10,7 @@ import i18next from 'i18next';
* @param {object} options - Options passed to Intl.DateTimeFormat
* @returns {string} The formatted datetime
*/
export function dateTimeFormat(i18n, date, options) {
export function dateTimeFormat(i18n, date, options = {}) {
return new Intl.DateTimeFormat(i18n.languages, options).format(date);
}
......@@ -24,7 +24,7 @@ export function dateTimeFormat(i18n, date, options) {
* @param {object} options - Options passed to Intl.NumberFormat
* @returns {string} The formatted number
*/
export function numberFormat(i18n, number, options) {
export function numberFormat(i18n, number, options = {}) {
return new Intl.NumberFormat(i18n.languages, options).format(number);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment