Skip to content

Commit b99af87

Browse files
Do not apply collection if used
1 parent 5912ea0 commit b99af87

File tree

1 file changed

+7
-3
lines changed
  • application/client/src/app/service/history

1 file changed

+7
-3
lines changed

application/client/src/app/service/history/session.ts

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -197,11 +197,15 @@ export class HistorySession extends Subscriber {
197197
}
198198

199199
public apply(collection: Collections) {
200-
if (this.storage.collections.get(collection.uuid) === undefined) {
200+
let storage_collection = this.storage.collections.get(collection.uuid);
201+
202+
if (storage_collection === undefined) {
201203
this.storage.collections.insert(collection);
202-
} else {
203-
this.storage.collections.used(collection.uuid);
204+
}
205+
if (storage_collection !== undefined && storage_collection.used > 0) {
206+
return;
204207
}
208+
this.storage.collections.used(collection.uuid);
205209
this.setCollection(collection);
206210
this.definitions.list().forEach((def) => {
207211
this.collections.bind(def);

0 commit comments

Comments
 (0)