mirror of
https://gitlab.com/openstapps/openstapps.git
synced 2026-01-10 19:52:53 +00:00
fix: detail view should not reuse things without references
This commit is contained in:
@@ -93,6 +93,11 @@ export class DataDetailComponent implements OnInit {
|
||||
translateService: TranslateService,
|
||||
) {
|
||||
this.inputItem = router.getCurrentNavigation()?.extras.state?.item;
|
||||
if (!this.inputItem?.origin) {
|
||||
// We received a ThingWithoutReferences.
|
||||
// This can happen, for example, when detail views use `inPlace` list items
|
||||
delete this.inputItem;
|
||||
}
|
||||
this.language = translateService.currentLang as SCLanguageCode;
|
||||
translateService.onLangChange.subscribe((event: LangChangeEvent) => {
|
||||
this.language = event.lang as SCLanguageCode;
|
||||
|
||||
@@ -228,10 +228,6 @@ export class SearchPageComponent implements OnInit {
|
||||
this.updateContextFilter(result.facets);
|
||||
this.items = Promise.resolve(result.data);
|
||||
}
|
||||
|
||||
this.items.then(it => {
|
||||
if (it.length === result.pagination.total) console.log('final page loaded');
|
||||
});
|
||||
} catch (error) {
|
||||
this.logger.error(error);
|
||||
} finally {
|
||||
|
||||
@@ -105,11 +105,9 @@ export class PositionService {
|
||||
subscriber.next(this.position);
|
||||
}
|
||||
});
|
||||
watcherID.then(console.log);
|
||||
return {
|
||||
unsubscribe() {
|
||||
watcherID.then(id => {
|
||||
console.log(id);
|
||||
void Geolocation.clearWatch({id});
|
||||
});
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user