diff --git a/app/assets/javascripts/components/NoteView/NoteView.tsx b/app/assets/javascripts/components/NoteView/NoteView.tsx index 36e3ce1dc..703077b1e 100644 --- a/app/assets/javascripts/components/NoteView/NoteView.tsx +++ b/app/assets/javascripts/components/NoteView/NoteView.tsx @@ -407,7 +407,7 @@ export class NoteView extends PureComponent { } } - async dismissProtectedWarning() { + dismissProtectedWarning = async () => { let showNoteContents = true; if (this.application.hasProtectionSources()) { showNoteContents = await this.application.authorizeNoteAccess(this.note); @@ -417,7 +417,7 @@ export class NoteView extends PureComponent { } this.setShowProtectedOverlay(false); this.focusTitle(); - } + }; streamItems() { this.removeComponentStreamObserver = this.application.streamItems( @@ -830,11 +830,11 @@ export class NoteView extends PureComponent { }); } - stackComponentExpanded(component: SNComponent): boolean { + stackComponentExpanded = (component: SNComponent): boolean => { return !!this.state.stackComponentViewers.find( (viewer) => viewer.componentUuid === component.uuid ); - } + }; toggleStackComponent = async (component: SNComponent) => { if (!component.isExplicitlyEnabledForItem(this.note.uuid)) { @@ -882,7 +882,7 @@ export class NoteView extends PureComponent { editor.scrollTop = this.scrollPosition; }; - onSystemEditorLoad(ref: HTMLTextAreaElement | null) { + onSystemEditorLoad = (ref: HTMLTextAreaElement | null) => { if (this.removeTabObserver || !ref) { return; } @@ -961,7 +961,7 @@ export class NoteView extends PureComponent { }); observer.observe(editor.parentElement as HTMLElement, { childList: true }); - } + }; render() { if (this.state.showProtectedWarning) {