Skip to content

Commit ce2e44a

Browse files
Following @sorvell suggestion
1 parent 58a9414 commit ce2e44a

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

src/lib/updating-element.ts

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -506,18 +506,15 @@ export abstract class UpdatingElement extends HTMLElement {
506506
const needsFirstUpdate = !(this._updateState & STATE_HAS_UPDATED);
507507
this._markUpdated();
508508
if (needsFirstUpdate) {
509+
this._updateState = this._updateState | STATE_HAS_UPDATED;
509510
this.firstUpdated(changedProperties);
510511
}
511512
this.updated(changedProperties);
512513
} else {
513-
this._markNotUpdated();
514+
this._markUpdated();
514515
}
515516
}
516517
private _markUpdated() {
517-
this._changedProperties = new Map();
518-
this._updateState = this._updateState & ~STATE_UPDATE_REQUESTED | STATE_HAS_UPDATED;
519-
}
520-
private _markNotUpdated() {
521518
this._changedProperties = new Map();
522519
this._updateState = this._updateState & ~STATE_UPDATE_REQUESTED;
523520
}

0 commit comments

Comments
 (0)