casbloem / vue-luxon

Easy use of datetime with Luxon in Vue
https://npmjs.com/package/vue-luxon
72 stars 8 forks source link

deep = false on extending options #1

Closed aaronpeterson closed 6 years ago

aaronpeterson commented 6 years ago

Awesome package you have going! Just a heads-up that with deep = false on the options extending, setting i18n to even an empty object overwrites the i18n object completely which will break your diffforhumans (among other things). If one were to blindly copy/paste your usage example (which I would never do, ever) an empty option like i18n would definitely break things. Not sure if the solution was to update the documentation or switch options to deep extend so I'm posting an issue. I can't see why anyone would change i18n for "day" and not "month" but alas...

casbloem commented 6 years ago

the extend function is updated 👍

(btw you can use the i18n for other languages etc.)