Skip to content

Commit

Permalink
fix: Update RelativeTime plugin default config (#883)
Browse files Browse the repository at this point in the history
  • Loading branch information
zerooverture committed Apr 26, 2020
1 parent bcea067 commit 0606f42
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/plugin/relativeTime/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import * as C from '../../constant'
export default (o, c, d) => {
o = o || {}
const proto = c.prototype
d.en.relativeTime = {
const relObj = {
future: 'in %s',
past: '%s ago',
s: 'a few seconds',
Expand All @@ -18,8 +18,9 @@ export default (o, c, d) => {
y: 'a year',
yy: '%d years'
}
d.en.relativeTime = relObj
const fromTo = (input, withoutSuffix, instance, isFrom) => {
const loc = instance.$locale().relativeTime
const loc = instance.$locale().relativeTime || relObj
const T = o.thresholds || [
{ l: 's', r: 44, d: C.S },
{ l: 'm', r: 89 },
Expand Down

0 comments on commit 0606f42

Please sign in to comment.