Skip to content

Commit b2939cd

Browse files
weakishleeyeh
authored andcommitted
refactor(AVObject): simplify get Created/UpdatedAt (#568)
`this.get('createdAt')` itself evaluates to `this.createdAt`, thus `this.createdAt || this.get('createdAt')` is unnecessary. The same applies to `getUpdatedAt`.
1 parent bb7907e commit b2939cd

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/object.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -228,15 +228,15 @@ module.exports = function(AV) {
228228
* @return {Date}
229229
*/
230230
getCreatedAt: function() {
231-
return this.createdAt || this.get('createdAt');
231+
return this.createdAt;
232232
},
233233

234234
/**
235235
* Returns the object's updatedAt attribute.
236236
* @return {Date}
237237
*/
238238
getUpdatedAt: function() {
239-
return this.updatedAt || this.get('updatedAt');
239+
return this.updatedAt;
240240
},
241241

242242
/**

0 commit comments

Comments
 (0)