Skip to content

Commit

Permalink
πŸ› one last locale fix
Browse files Browse the repository at this point in the history
  • Loading branch information
acidjazz committed Oct 17, 2023
1 parent 747dda3 commit ae18c97
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -144,9 +144,11 @@ ${plugins?.map(plugin => `dayjs.extend(${plugin})`).join('\n')}
${externalPlugins?.map(plugin => `dayjs.extend(${plugin.name})`).join('\n')}
${defaultTimezone ? `dayjs.tz.setDefault('${defaultTimezone}')` : ''}
// defaultLocale: ${JSON.stringify(defaultLocale)}
${defaultLocale ? `
dayjs.updateLocale(${JSON.stringify(defaultLocale).replace(/^\[|\]$/g, '')})
dayjs.locale('${defaultLocale[0] || defaultLocale}')
dayjs.locale('${typeof defaultLocale === 'string' ? defaultLocale : defaultLocale[0]}')
` : ""}
export default dayjs
Expand Down

0 comments on commit ae18c97

Please sign in to comment.