Skip to content

Commit

Permalink
chore: reword key name
Browse files Browse the repository at this point in the history
  • Loading branch information
Barrior committed Oct 21, 2019
1 parent 5ffd65d commit 2e1f503
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,13 +67,13 @@ class ModifiedAt {

public async setTimestamps(params: {
that?: any
purelySet?: boolean
softlySet?: boolean
doc: any
modifiedPaths: string[]
}) {
const { suffix, fields, customList } = this.options
const purelySet = params.hasOwnProperty('purelySet')
? params.purelySet
const softlySet = params.hasOwnProperty('softlySet')
? params.softlySet
: true

const updatePaths: string[] = []
Expand All @@ -96,7 +96,7 @@ class ModifiedAt {
}

forEach(updatePaths, pathname => {
if (purelySet) {
if (softlySet) {
params.that.set(pathname, updateTime)
} else {
params.that[pathname] = updateTime
Expand Down Expand Up @@ -144,7 +144,7 @@ class ModifiedAt {
that: updates,
doc: assign({}, this.getFilter(), updates),
modifiedPaths: keys(updates),
purelySet: false,
softlySet: false,
})
this.setUpdate(updates)
}
Expand All @@ -162,7 +162,7 @@ class ModifiedAt {
that: doc,
doc,
modifiedPaths: keys(doc),
purelySet: false,
softlySet: false,
})
}
})
Expand Down

0 comments on commit 2e1f503

Please sign in to comment.