Skip to content

Commit 2a7eebb

Browse files
author
Dennis Labordus
committed
Changed way list is retrieved.
Signed-off-by: Dennis Labordus <[email protected]>
1 parent f304552 commit 2a7eebb

File tree

1 file changed

+5
-9
lines changed

1 file changed

+5
-9
lines changed

src/compas-editors/CompasVersions.ts

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -45,20 +45,16 @@ export default class CompasVersionsPlugin extends LitElement {
4545
@property()
4646
historyItem: Element[] | undefined;
4747

48-
firstUpdated(): void {
49-
if (!this.docId) {
50-
this.historyItem = [];
51-
} else {
52-
this.fetchData()
53-
}
54-
}
55-
5648
protected updated(_changedProperties: PropertyValues): void {
5749
super.updated(_changedProperties);
5850

5951
// When the document is updated, we also will retrieve the history again, because probably it has changed.
6052
if (_changedProperties.has('doc')) {
61-
this.firstUpdated();
53+
if (!this.docId) {
54+
this.historyItem = [];
55+
} else {
56+
this.fetchData()
57+
}
6258
}
6359
}
6460

0 commit comments

Comments
 (0)