We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 499bbe1 commit 2b591a4Copy full SHA for 2b591a4
lib/model.ts
@@ -265,16 +265,14 @@ export class Model {
265
return this._formatField(this._fieldMatching.toClient, field, camelCase);
266
}
267
268
- /* Wraps values with defaults */
+ /* Wraps values with defaults. */
269
private static _wrapValuesWithDefaults(values: Values): Values {
270
for (const field of Object.keys(this.fields)) {
271
if (values.hasOwnProperty(field)) {
272
continue;
273
274
275
- if (this.hasOwnProperty(field)) {
276
- values[field] = (this as any)[field];
277
- } else if (this.defaults.hasOwnProperty(field)) {
+ if (this.defaults.hasOwnProperty(field)) {
278
const defaultValue = this.defaults[field];
279
280
if (typeof defaultValue === "function") {
0 commit comments