Skip to content

Commit 0606f42

Browse files
authored
fix: Update RelativeTime plugin default config (#883)
1 parent bcea067 commit 0606f42

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/plugin/relativeTime/index.js

+3-2
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import * as C from '../../constant'
33
export default (o, c, d) => {
44
o = o || {}
55
const proto = c.prototype
6-
d.en.relativeTime = {
6+
const relObj = {
77
future: 'in %s',
88
past: '%s ago',
99
s: 'a few seconds',
@@ -18,8 +18,9 @@ export default (o, c, d) => {
1818
y: 'a year',
1919
yy: '%d years'
2020
}
21+
d.en.relativeTime = relObj
2122
const fromTo = (input, withoutSuffix, instance, isFrom) => {
22-
const loc = instance.$locale().relativeTime
23+
const loc = instance.$locale().relativeTime || relObj
2324
const T = o.thresholds || [
2425
{ l: 's', r: 44, d: C.S },
2526
{ l: 'm', r: 89 },

0 commit comments

Comments
 (0)