diff --git a/polygerrit-ui/app/elements/diff/gr-diff-cursor/gr-diff-cursor.ts b/polygerrit-ui/app/elements/diff/gr-diff-cursor/gr-diff-cursor.ts index 1896effd94..59a0370304 100644 --- a/polygerrit-ui/app/elements/diff/gr-diff-cursor/gr-diff-cursor.ts +++ b/polygerrit-ui/app/elements/diff/gr-diff-cursor/gr-diff-cursor.ts @@ -79,7 +79,7 @@ export class GrDiffCursor extends GestureEventListeners( private _preventAutoScrollOnManualScroll = false; - private _lastDisplayedNavigateToNextFileToast: number | null = null; + private lastDisplayedNavigateToNextFileToast: number | null = null; @property({type: String}) side = Side.RIGHT; @@ -222,12 +222,12 @@ export class GrDiffCursor extends GestureEventListeners( this.$.cursorManager.isAtEnd() ) { if ( - this._lastDisplayedNavigateToNextFileToast && - Date.now() - this._lastDisplayedNavigateToNextFileToast <= + this.lastDisplayedNavigateToNextFileToast && + Date.now() - this.lastDisplayedNavigateToNextFileToast <= NAVIGATE_TO_NEXT_FILE_TIMEOUT_MS ) { // reset for next file - this._lastDisplayedNavigateToNextFileToast = null; + this.lastDisplayedNavigateToNextFileToast = null; this.dispatchEvent( new CustomEvent('navigate-to-next-unreviewed-file', { composed: true, @@ -235,7 +235,7 @@ export class GrDiffCursor extends GestureEventListeners( }) ); } - this._lastDisplayedNavigateToNextFileToast = Date.now(); + this.lastDisplayedNavigateToNextFileToast = Date.now(); this.dispatchEvent( new CustomEvent('show-alert', { detail: { diff --git a/polygerrit-ui/app/elements/shared/gr-comment-thread/gr-comment-thread.ts b/polygerrit-ui/app/elements/shared/gr-comment-thread/gr-comment-thread.ts index 1c51f99317..fe6a0fddf1 100644 --- a/polygerrit-ui/app/elements/shared/gr-comment-thread/gr-comment-thread.ts +++ b/polygerrit-ui/app/elements/shared/gr-comment-thread/gr-comment-thread.ts @@ -554,7 +554,7 @@ export class GrCommentThread extends KeyboardShortcutMixin( const comment = diffCommentEl.comment; const idx = this._indexOf(comment, this.comments); if (idx === -1) { - throw Error( + throw new Error( 'Cannot find comment ' + JSON.stringify(diffCommentEl.comment) ); } @@ -574,7 +574,7 @@ export class GrCommentThread extends KeyboardShortcutMixin( path: changeComment.path, line: changeComment.line, }; - return this.$.storage.setDraftComment( + this.$.storage.setDraftComment( commentLocation, changeComment.message ?? '' );