Closed dyurkavets closed 5 years ago
import assert from 'assert' import { Model, prop } from '@rawmodel/core' class Issue extends Model { @prop() closed!: boolean @prop() priority!: number } const issue = new Issue({ closed: false, priority: 0 }) issue.commit() // AssertionError [ERR_ASSERTION]: true == false assert.equal( issue.isChanged(), false ) // AssertionError [ERR_ASSERTION]: { closed: false, priority: 0 } deepEqual {} assert.deepEqual( issue.filter((ref) => ref.prop.isChanged()), {} )
https://github.com/rawmodel/framework/blob/master/packages/rawmodel-core/src/core/props.ts#L358
Thanks! I'll fix this asap.
https://github.com/rawmodel/framework/pull/54
https://github.com/rawmodel/framework/blob/master/packages/rawmodel-core/src/core/props.ts#L358