OpenProject is the leading open source project management software for product, project and portfolio management. A powerful Jira alternative with agile planning, issue tracking, roadmaps, Gantt charts, time tracking, collaboration features, and more. Available on premises or in the cloud. ⭐ Star us on GitHub
Ruby agile-developmentangularbcfboardsbug-trackerganttgantt-chartifcissue-trackerjira-alternativekanbanopenprojectproduct-managementproject-managementproject-planningroadmaprubyscrumtimelineworkflows
Avoid boostrap embedded components while app is running change detection
Aleix Suau83c667aa2cf5
diff --git a/frontend/src/app/globals/dynamic-bootstrapper.ts b/frontend/src/app/globals/dynamic-bootstrapper.tsindex 0e48ffdece3..06858cfcfa2 100644--- a/frontend/src/app/globals/dynamic-bootstrapper.ts+++ b/frontend/src/app/globals/dynamic-bootstrapper.ts@@ -27,6 +27,7 @@import {ComponentType} from "@angular/cdk/portal";import {ApplicationRef} from "@angular/core";+import {filter, take} from "rxjs/operators";/*** Optional bootstrap definition to allow selecting all matching@@ -81,7 +82,17 @@ export class DynamicBootstrapper {* @param {OptionalBootstrapDefinition[]|undefined} definitions An optional set of components to bootstrap*/public static bootstrapOptionalEmbeddable(appRef:ApplicationRef, element:HTMLElement, definitions = this.optionalBoostrapComponents) {- this.performBootstrap(appRef, element, true, definitions);+ // Avoid bootstrapping the embedded components while the app+ // is running the Change Detection ("ApplicationRef.tick+ // is called recursively" error)+ appRef+ .isStable+ .pipe(+ filter(isStable => isStable),+ take(1),+ )+ .toPromise()+ .then(() => this.performBootstrap(appRef, element, true, definitions));}/**