adopted-ember-addons / validated-changeset

Buffering changes to form data
MIT License
36 stars 27 forks source link

The original values of falsy properties are not returned #158

Closed azhiv closed 2 years ago

azhiv commented 2 years ago

Consider the following usecase:

const changeset = Changeset({ name: '', flag: false, count: 0, ref: null, success: true });

console.log(changeset.name);        // undefined
console.log(changeset.flag);        // undefined
console.log(changeset.count);       // undefined
console.log(changeset.ref);         // undefined
console.log(changeset.success);     // true

All results except for the last one look incorrect.

Could you please review a PR I created to tackle the issue?