Skip to content

Commit 2b591a4

Browse files
committed
CR: remove useless lines & comment correction
1 parent 499bbe1 commit 2b591a4

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

lib/model.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -265,16 +265,14 @@ export class Model {
265265
return this._formatField(this._fieldMatching.toClient, field, camelCase);
266266
}
267267

268-
/* Wraps values with defaults */
268+
/* Wraps values with defaults. */
269269
private static _wrapValuesWithDefaults(values: Values): Values {
270270
for (const field of Object.keys(this.fields)) {
271271
if (values.hasOwnProperty(field)) {
272272
continue;
273273
}
274274

275-
if (this.hasOwnProperty(field)) {
276-
values[field] = (this as any)[field];
277-
} else if (this.defaults.hasOwnProperty(field)) {
275+
if (this.defaults.hasOwnProperty(field)) {
278276
const defaultValue = this.defaults[field];
279277

280278
if (typeof defaultValue === "function") {

0 commit comments

Comments
 (0)