Skip to content

Commit

Permalink
CR: remove useless lines & comment correction
Browse files Browse the repository at this point in the history
  • Loading branch information
jrdx0 committed Apr 29, 2021
1 parent 499bbe1 commit 2b591a4
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions lib/model.ts
Original file line number Diff line number Diff line change
Expand Up @@ -265,16 +265,14 @@ export class Model {
return this._formatField(this._fieldMatching.toClient, field, camelCase);
}

/* Wraps values with defaults */
/* Wraps values with defaults. */
private static _wrapValuesWithDefaults(values: Values): Values {
for (const field of Object.keys(this.fields)) {
if (values.hasOwnProperty(field)) {
continue;
}

if (this.hasOwnProperty(field)) {
values[field] = (this as any)[field];
} else if (this.defaults.hasOwnProperty(field)) {
if (this.defaults.hasOwnProperty(field)) {
const defaultValue = this.defaults[field];

if (typeof defaultValue === "function") {
Expand Down

0 comments on commit 2b591a4

Please sign in to comment.