Skip to content

Commit 97f83b3

Browse files
author
Steven Orvell
committed
Fix recently merged test
1 parent 8b22a15 commit 97f83b3

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

src/lib/updating-element.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -502,9 +502,8 @@ export abstract class UpdatingElement extends HTMLElement {
502502
if (this.shouldUpdate(this._changedProperties)) {
503503
const changedProperties = this._changedProperties;
504504
this.update(changedProperties);
505-
const needsFirstUpdate = !(this._updateState & STATE_HAS_UPDATED);
506505
this._markUpdated();
507-
if (needsFirstUpdate) {
506+
if (!(this._updateState & STATE_HAS_UPDATED)) {
508507
this._updateState = this._updateState | STATE_HAS_UPDATED;
509508
this.firstUpdated(changedProperties);
510509
}

src/test/lit-element_test.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1097,12 +1097,11 @@ suite('LitElement', () => {
10971097
const el = new E();
10981098
container.appendChild(el);
10991099
await el.updateComplete;
1100-
const testMap = new Map();
1101-
testMap.set('foo', undefined);
11021100
assert.equal(el.triedToUpdatedCount, 1);
11031101
assert.equal(el.wasUpdatedCount, 0);
11041102
assert.equal(el.wasFirstUpdated, 0);
11051103
await el.requestUpdate();
1104+
const testMap = new Map();
11061105
assert.deepEqual(el.changedProperties, testMap);
11071106
assert.equal(el.triedToUpdatedCount, 2);
11081107
assert.equal(el.wasUpdatedCount, 1);

0 commit comments

Comments
 (0)