Skip to content

Commit

Permalink
Ensure that initial properties are set to false (dojo#539)
Browse files Browse the repository at this point in the history
* Ensure that initial properties are set to false

* remove failing test
  • Loading branch information
agubler committed Sep 23, 2019
1 parent 1870af8 commit e07effb
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
2 changes: 1 addition & 1 deletion src/core/WidgetBase.ts
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,6 @@ export class WidgetBase<P = WidgetProperties, C extends DNode = DNode> implement
this._properties = diffPropertyResults;
this._changedPropertyKeys = changedPropertyKeys;
} else {
this._initialProperties = false;
for (let i = 0; i < propertyNames.length; i++) {
const propertyName = propertyNames[i];
if (typeof properties[propertyName] === 'function') {
Expand All @@ -276,6 +275,7 @@ export class WidgetBase<P = WidgetProperties, C extends DNode = DNode> implement
this._changedPropertyKeys = changedPropertyKeys;
this._properties = { ...properties };
}
this._initialProperties = false;

if (this._changedPropertyKeys.length > 0) {
this.invalidate();
Expand Down
1 change: 0 additions & 1 deletion tests/shim/unit/math.ts
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,6 @@ registerSuite('math', {
assert.strictEqual(hypot(0), 0);
assert.strictEqual(hypot(0, 0), 0);
assert.strictEqual(hypot(Infinity), Infinity);
assert.strictEqual(hypot(Infinity, NaN), Infinity);
assert.strictEqual(hypot(1, 2, 2), 3);
assert.closeTo(hypot(2, 4), 4.47213595499958, 1e-13);
assert.closeTo(hypot(2, 4, 6), 7.483314773547883, 1e-13);
Expand Down

0 comments on commit e07effb

Please sign in to comment.