Component stack fixes

This commit is contained in:
Mo Bitar
2020-04-16 09:46:15 -05:00
parent 407e3ea0d8
commit c94742d248
7 changed files with 168 additions and 100 deletions

View File

@@ -14,7 +14,6 @@ export class ComponentGroup {
private application: WebApplication
changeObservers: any[] = []
activeComponents: UuidString[] = []
constructor(application: WebApplication) {
this.application = application;
@@ -86,6 +85,7 @@ export class ComponentGroup {
*/
public addChangeObserver(callback: () => void) {
this.changeObservers.push(callback);
callback();
return () => {
removeFromArray(this.changeObservers, callback);
}

View File

@@ -38,7 +38,7 @@ export class Editor {
if (matchingNote) {
this.isTemplateNote = false;
this.note = matchingNote;
this._onNoteValueChange!(matchingNote, source);
this._onNoteValueChange && this._onNoteValueChange!(matchingNote, source);
}
}